From: <man...@us...> - 2015-03-03 22:41:48
|
Revision: 4817 http://sourceforge.net/p/modplug/code/4817 Author: manxorist Date: 2015-03-03 22:41:35 +0000 (Tue, 03 Mar 2015) Log Message: ----------- [Ref] Silence another charset conversion warning. Modified Paths: -------------- trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2015-03-03 20:57:40 UTC (rev 4816) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2015-03-03 22:41:35 UTC (rev 4817) @@ -731,7 +731,7 @@ } } else // scl import. { - EnSclImport a = ImportScl(files[counter], fileName.ToCString()); + EnSclImport a = ImportScl(files[counter], fileName.ToUnicode()); if (a != enSclImportOk) { if (a == enSclImportAddTuningFailure && m_TempTunings.GetNumTunings() >= CTuningCollection::s_nMaxTuningCount) @@ -1466,20 +1466,20 @@ } -CTuningDialog::EnSclImport CTuningDialog::ImportScl(const mpt::PathString &filename, LPCTSTR pszName) -//--------------------------------------------------------------------------------------------------- +CTuningDialog::EnSclImport CTuningDialog::ImportScl(const mpt::PathString &filename, const mpt::ustring &name) +//------------------------------------------------------------------------------------------------------------ { mpt::ifstream iStrm(filename, std::ios::in | std::ios::binary); if(!iStrm) { return enSclImportFailUnableToOpenFile; } - return ImportScl(iStrm, pszName); + return ImportScl(iStrm, name); } -CTuningDialog::EnSclImport CTuningDialog::ImportScl(std::istream& iStrm, LPCTSTR pszName) -//--------------------------------------------------------------------------------------- +CTuningDialog::EnSclImport CTuningDialog::ImportScl(std::istream& iStrm, const mpt::ustring &name) +//------------------------------------------------------------------------------------------------ { std::string str; SkipCommentLines(iStrm, str); @@ -1564,7 +1564,7 @@ return enSclImportAddTuningFailure; } - pT->SetName(pszName); + pT->SetName(mpt::ToLocale(name)); return enSclImportOk; } Modified: trunk/OpenMPT/mptrack/TuningDialog.h =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.h 2015-03-03 20:57:40 UTC (rev 4816) +++ trunk/OpenMPT/mptrack/TuningDialog.h 2015-03-03 22:41:35 UTC (rev 4817) @@ -257,8 +257,8 @@ bool IsDeletable(const CTuningCollection* const pTC) const; // Scl-file import. - EnSclImport ImportScl(const mpt::PathString &filename, LPCTSTR pszName); - EnSclImport ImportScl(std::istream& iStrm, LPCTSTR pszName); + EnSclImport ImportScl(const mpt::PathString &filename, const mpt::ustring &name); + EnSclImport ImportScl(std::istream& iStrm, const mpt::ustring &name); private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |