From: <man...@us...> - 2015-06-03 09:42:40
|
Revision: 5241 http://sourceforge.net/p/modplug/code/5241 Author: manxorist Date: 2015-06-03 09:42:34 +0000 (Wed, 03 Jun 2015) Log Message: ----------- [Ref] Cleanup some mpt::ToLocale uses. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-02 15:11:53 UTC (rev 5240) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-03 09:42:34 UTC (rev 5241) @@ -2853,7 +2853,7 @@ str.Preallocate(80); str.Format(_T("FX%d: "), iPlug + 1); const int size0 = str.GetLength(); - str += (librarynames) ? mpt::ToLocale(mpt::CharsetUTF8, plugin.GetLibraryName()).c_str() : plugin.GetName(); + str += (librarynames) ? mpt::ToCString(mpt::CharsetUTF8, plugin.GetLibraryName()) : CString(plugin.GetName()); if(str.GetLength() <= size0) str += _T("undefined"); CBox.SetItemData(CBox.AddString(str), iPlug + 1); Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2015-06-02 15:11:53 UTC (rev 5240) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2015-06-03 09:42:34 UTC (rev 5241) @@ -123,7 +123,7 @@ break; } const std::wstring keyname = keynameBuf; - Log(mpt::String::Print("ASIO: Found '%1':", mpt::ToLocale(keyname))); + Log(mpt::String::Print(MPT_USTRING("ASIO: Found '%1':"), keyname)); HKEY hksub = NULL; if(RegOpenKeyExW(hkEnum, keynameBuf, 0, KEY_READ, &hksub) != ERROR_SUCCESS) @@ -137,7 +137,7 @@ mpt::ustring description; if(ERROR_SUCCESS == RegQueryValueExW(hksub, L"Description", 0, &datatype, (LPBYTE)descriptionBuf, &datasize)) { - Log(mpt::String::Print("ASIO: description='%1'", mpt::ToLocale(description))); + Log(mpt::String::Print(MPT_USTRING("ASIO: description='%1'"), description)); description = mpt::ToUnicode(descriptionBuf); } else { @@ -152,7 +152,7 @@ const mpt::ustring internalID = mpt::ToUnicode(idBuf); if(Util::IsCLSID(mpt::ToWide(internalID))) { - Log(mpt::String::Print("ASIO: clsid=%1", mpt::ToLocale(internalID))); + Log(mpt::String::Print(MPT_USTRING("ASIO: clsid=%1"), internalID)); SoundDevice::Info info; info.type = TypeASIO; info.internalID = internalID; @@ -257,8 +257,8 @@ InitMembers(); - Log(mpt::String::Print("ASIO: Open('%1'): %2-bit, (%3,%4) channels, %5Hz, hw-timing=%6" - , mpt::ToLocale(GetDeviceInternalID()) + Log(mpt::String::Print(MPT_USTRING("ASIO: Open('%1'): %2-bit, (%3,%4) channels, %5Hz, hw-timing=%6") + , GetDeviceInternalID() , m_Settings.sampleFormat.GetBitsPerSample() , m_Settings.InputChannels , m_Settings.Channels Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2015-06-02 15:11:53 UTC (rev 5240) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2015-06-03 09:42:34 UTC (rev 5241) @@ -489,7 +489,7 @@ result.apiPath.push_back(MPT_USTRING("PortAudio")); result.isDefault = (Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == (PaDeviceIndex)dev); result.useNameAsIdentifier = true; - PALOG(mpt::String::Print("PortAudio: %1, %2, %3, %4", result.id.GetIdRaw(), mpt::ToLocale(result.name), mpt::ToLocale(result.apiName), result.isDefault)); + PALOG(mpt::String::Print(MPT_USTRING("PortAudio: %1, %2, %3, %4"), result.id.GetIdRaw(), result.name, result.apiName, result.isDefault)); PALOG(mpt::String::Print(" low : %1", Pa_GetDeviceInfo(dev)->defaultLowOutputLatency)); PALOG(mpt::String::Print(" high : %1", Pa_GetDeviceInfo(dev)->defaultHighOutputLatency)); devices.push_back(result); Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2015-06-02 15:11:53 UTC (rev 5240) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2015-06-03 09:42:34 UTC (rev 5241) @@ -644,7 +644,7 @@ { Reporting::Notification(msg); #ifdef VST_LOG - Log("%s", mpt::ToLocale(msg).c_str()); + Log(mpt::ToUnicode(msg)); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |