From a073f3e02752b0483e6a9301cbf02695239c7783 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 13 Feb 2010 13:58:51 +0100 Subject: 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 --- src/base/song.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/base/song.cpp') 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& header) : + Song::Song(const boost::filesystem::wpath& filename, + const std::map& header) : filename(filename), custom_header_tags(header) { std::map::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."); } -- cgit v1.2.3