From: <man...@us...> - 2014-10-06 09:48:31
|
Revision: 4384 http://sourceforge.net/p/modplug/code/4384 Author: manxorist Date: 2014-10-06 09:48:18 +0000 (Mon, 06 Oct 2014) Log Message: ----------- [Ref] Convert LogLevelToString() to mpt::ustring. Modified Paths: -------------- trunk/OpenMPT/common/Logging.h trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/common/Logging.h =================================================================== --- trunk/OpenMPT/common/Logging.h 2014-10-06 09:29:37 UTC (rev 4383) +++ trunk/OpenMPT/common/Logging.h 2014-10-06 09:48:18 UTC (rev 4384) @@ -23,16 +23,16 @@ }; -inline std::string LogLevelToString(LogLevel level) +inline mpt::ustring LogLevelToString(LogLevel level) { switch(level) { - case LogError: return "error"; break; - case LogWarning: return "warning"; break; - case LogInformation: return "info"; break; - case LogNotification: return "notify"; break; + case LogError: return MPT_USTRING("error"); break; + case LogWarning: return MPT_USTRING("warning"); break; + case LogInformation: return MPT_USTRING("info"); break; + case LogNotification: return MPT_USTRING("notify"); break; } - return "unknown"; + return MPT_USTRING("unknown"); } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2014-10-06 09:29:37 UTC (rev 4383) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2014-10-06 09:48:18 UTC (rev 4384) @@ -657,7 +657,11 @@ #ifdef MODPLUG_TRACKER if(GetpModDoc()) GetpModDoc()->AddToLog(level, text); #else - std::clog << "openmpt: " << LogLevelToString(level) << ": " << text << std::endl; + #ifdef MPT_WITH_CHARSET_LOCALE + std::clog << "openmpt: " << mpt::ToLocale(LogLevelToString(level)) << ": " << text << std::endl; + #else + std::clog << "openmpt: " << mpt::ToCharset(mpt::CharsetUTF8, LogLevelToString(level)) << ": " << text << std::endl; + #endif #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |