aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/song.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-02-13 13:58:51 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:46 +0100
commita073f3e02752b0483e6a9301cbf02695239c7783 (patch)
tree74f973f6bdc3b5ad9ea53df9061fcf279568ef41 /src/base/song.cpp
parent2b1073a98ccf6ab97df1c7a05d2d5fe12982da07 (diff)
downloadusdx-a073f3e02752b0483e6a9301cbf02695239c7783.tar.gz
usdx-a073f3e02752b0483e6a9301cbf02695239c7783.tar.xz
usdx-a073f3e02752b0483e6a9301cbf02695239c7783.zip
changed all song paths to boost::filesystem::wpath
all song paths are now wpath so all extensions are also std::wstring and all logging with song filename have to be also std::wstring
Diffstat (limited to 'src/base/song.cpp')
-rw-r--r--src/base/song.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/base/song.cpp b/src/base/song.cpp
index ff00bbed..959102c2 100644
--- a/src/base/song.cpp
+++ b/src/base/song.cpp
@@ -33,12 +33,13 @@ namespace usdx
log4cxx::LoggerPtr Song::log =
log4cxx::Logger::getLogger("usdx.base.Song");
- const std::string& Song::get_filename(void) const
+ const boost::filesystem::wpath& Song::get_filename(void) const
{
return filename;
}
- Song::Song(const std::string& filename, const std::map<std::wstring, std::wstring>& header) :
+ Song::Song(const boost::filesystem::wpath& filename,
+ const std::map<std::wstring, std::wstring>& header) :
filename(filename), custom_header_tags(header)
{
std::map<std::wstring, std::wstring>::iterator it;
@@ -108,7 +109,7 @@ namespace usdx
}
else if (required) {
LOG4CXX_ERROR(log, L"Incomplete Song! Missing '" << tag << L"' Tag in: '" <<
- std::wstring(get_filename().begin(), get_filename().end()) << L"'");
+ get_filename() << L"'");
throw MissingTagException(tag, "Incomplete Song! Missing Tag.");
}
@@ -126,7 +127,7 @@ namespace usdx
}
else if (required) {
LOG4CXX_ERROR(log, L"Incomplete Song! Missing '" << tag << L"' Tag in: '" <<
- std::wstring(get_filename().begin(), get_filename().end()) << L"'");
+ get_filename() << L"'");
throw MissingTagException(tag, "Incomplete Song! Missing Tag.");
}
@@ -145,7 +146,7 @@ namespace usdx
}
else if (required) {
LOG4CXX_ERROR(log, L"Incomplete Song! Missing '" << tag << L"' Tag in: '" <<
- std::wstring(get_filename().begin(), get_filename().end()) << L"'");
+ get_filename() << L"'");
throw MissingTagException(tag, "Incomplete Song! Missing Tag.");
}
@@ -167,7 +168,7 @@ namespace usdx
}
else if (required) {
LOG4CXX_ERROR(log, L"Incomplete Song! Missing '" << tag << L"' Tag in: '" <<
- std::wstring(get_filename().begin(), get_filename().end()) << L"'");
+ get_filename() << L"'");
throw MissingTagException(tag, "Incomplete Song! Missing Tag.");
}