From: <man...@us...> - 2015-03-11 16:33:54
|
Revision: 4873 http://sourceforge.net/p/modplug/code/4873 Author: manxorist Date: 2015-03-11 16:33:48 +0000 (Wed, 11 Mar 2015) Log Message: ----------- [Ref] Replace mpt::String::PrintW with mpt::String::Print. Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/Logging.cpp trunk/OpenMPT/common/mptString.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/common/BuildSettings.h 2015-03-11 16:33:48 UTC (rev 4873) @@ -270,7 +270,7 @@ #if defined(MODPLUG_TRACKER) || MPT_USTRING_MODE_WIDE - // mpt::ToWString, mpt::wfmt, mpt::String::PrintW, ConvertStrTo<std::wstring> + // mpt::ToWString, mpt::wfmt, ConvertStrTo<std::wstring> // Required by the tracker to ease interfacing with WinAPI. // Required by MPT_USTRING_MODE_WIDE to ease type tunneling in mpt::String::Print. #define MPT_WSTRING_FORMAT 1 Modified: trunk/OpenMPT/common/Logging.cpp =================================================================== --- trunk/OpenMPT/common/Logging.cpp 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/common/Logging.cpp 2015-03-11 16:33:48 UTC (rev 4873) @@ -71,7 +71,7 @@ } #endif // LOG_TO_FILE { - OutputDebugStringW(mpt::String::PrintW(L"%1(%2): +%3 %4 [%5]\n" + OutputDebugStringW(mpt::String::Print(L"%1(%2): +%3 %4 [%5]\n" , mpt::ToWide(mpt::CharsetASCII, context.file) , context.line , mpt::wfmt::dec<6>(diff) Modified: trunk/OpenMPT/common/mptString.h =================================================================== --- trunk/OpenMPT/common/mptString.h 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/common/mptString.h 2015-03-11 16:33:48 UTC (rev 4873) @@ -1386,8 +1386,6 @@ ); } -#define PrintW Print - } } // namespace mpt::String OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-03-11 16:33:48 UTC (rev 4873) @@ -128,7 +128,7 @@ else //Case: Valid path but opening fails. { const int nOdc = theApp.GetOpenDocumentCount(); - Reporting::Notification(mpt::String::PrintW(L"Opening \"%1\" failed. This can happen if " + Reporting::Notification(mpt::String::Print(L"Opening \"%1\" failed. This can happen if " L"no more documents can be opened or if the file type was not " L"recognised. If the former is true, it's " L"recommended to close some documents as otherwise a crash is likely" @@ -1813,7 +1813,7 @@ } else if(dialogShown) { CWnd *text = pluginScanDlg.GetDlgItem(IDC_SCANTEXT); - std::wstring scanStr = mpt::String::PrintW(L"Scanning Plugin %1 / %2...\n%3", plug, numPlugins, plugPath); + std::wstring scanStr = mpt::String::Print(L"Scanning Plugin %1 / %2...\n%3", plug, numPlugins, plugPath); SetWindowTextW(text->m_hWnd, scanStr.c_str()); MSG msg; while(::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2015-03-11 16:33:48 UTC (rev 4873) @@ -1088,7 +1088,7 @@ } } catch (...) { - ReportPlugException(mpt::String::PrintW(L"Exception in Dispatch(%1)!", opCode)); + ReportPlugException(mpt::String::Print(L"Exception in Dispatch(%1)!", opCode)); } return result; @@ -1208,7 +1208,7 @@ ResetSilence(); } catch (...) { - ReportPlugException(mpt::String::PrintW(L"Exception in SetParameter(%1, %2)!", nIndex, fValue)); + ReportPlugException(mpt::String::Print(L"Exception in SetParameter(%1, %2)!", nIndex, fValue)); } } @@ -1348,7 +1348,7 @@ ResetSilence(); } catch (...) { - ReportPlugException(mpt::String::PrintW(L"Exception in ProcessVSTEvents(numEvents:%1)!", + ReportPlugException(mpt::String::Print(L"Exception in ProcessVSTEvents(numEvents:%1)!", vstEvents.GetNumEvents())); } } @@ -1499,7 +1499,7 @@ { Bypass(); const wchar_t *processMethod = (m_Effect.flags & effFlagsCanReplacing) ? L"processReplacing" : L"process"; - ReportPlugException(mpt::String::PrintW(L"The plugin threw an exception in %1. It has automatically been set to \"Bypass\".", processMethod)); + ReportPlugException(mpt::String::Print(L"The plugin threw an exception in %1. It has automatically been set to \"Bypass\".", processMethod)); } ASSERT(outputBuffers != nullptr); Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2015-03-11 16:33:48 UTC (rev 4873) @@ -177,7 +177,7 @@ plug->pluginId2 = clsid.Data1; plug->category = VSTPluginLib::catDMO; #ifdef DMO_LOG - Log(mpt::String::PrintW(L"Found \"%1\" clsid=%2\n", plug->libraryName, plug->dllPath)); + Log(mpt::String::Print(L"Found \"%1\" clsid=%2\n", plug->libraryName, plug->dllPath)); #endif } } @@ -261,7 +261,7 @@ } } catch(...) { - CVstPluginManager::ReportPlugException(mpt::String::PrintW(L"Exception caught in LoadLibrary (%1)", pluginPath)); + CVstPluginManager::ReportPlugException(mpt::String::Print(L"Exception caught in LoadLibrary (%1)", pluginPath)); } if(library != nullptr && library != INVALID_HANDLE_VALUE) @@ -423,7 +423,7 @@ FreeLibrary(hLib); } catch(...) { - CVstPluginManager::ReportPlugException(mpt::String::PrintW(L"Exception while trying to load plugin \"%1\"!\n", plug->libraryName)); + CVstPluginManager::ReportPlugException(mpt::String::Print(L"Exception while trying to load plugin \"%1\"!\n", plug->libraryName)); } // Now it should be safe to assume that this plugin loaded properly. :) @@ -465,7 +465,7 @@ delete plug; } catch (...) { - CVstPluginManager::ReportPlugException(mpt::String::PrintW(L"Exception while trying to release plugin \"%1\"!\n", pFactory->libraryName)); + CVstPluginManager::ReportPlugException(mpt::String::Print(L"Exception while trying to release plugin \"%1\"!\n", pFactory->libraryName)); } return true; @@ -584,7 +584,7 @@ } } catch(...) { - CVstPluginManager::ReportPlugException(mpt::String::PrintW(L"Exception while trying to create plugin \"%1\"!\n", pFound->libraryName)); + CVstPluginManager::ReportPlugException(mpt::String::Print(L"Exception while trying to create plugin \"%1\"!\n", pFound->libraryName)); } return validPlugin; Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2015-03-11 16:21:42 UTC (rev 4872) +++ trunk/OpenMPT/test/test.cpp 2015-03-11 16:33:48 UTC (rev 4873) @@ -491,7 +491,6 @@ #if MPT_WSTRING_FORMAT VERIFY_EQUAL(mpt::String::Print(std::wstring(L"%1%2%3"),1,2,3), L"123"); VERIFY_EQUAL(mpt::String::Print(L"%1%2%3",1,2,3), L"123"); - VERIFY_EQUAL(mpt::String::PrintW(L"%1%2%3",1,2,3), L"123"); #endif // escaping and error behviour of '%' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |