From: <sv...@op...> - 2025-01-02 22:14:16
|
Author: manx Date: Thu Jan 2 23:14:04 2025 New Revision: 22737 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22737 Log: Merged revision(s) 22734 from trunk/OpenMPT: [Ref] xmp-openmpt: Silence unused function warning with UNICODE gcc. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Modified: branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp ============================================================================== --- branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Thu Jan 2 23:12:27 2025 (r22736) +++ branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Thu Jan 2 23:14:04 2025 (r22737) @@ -114,7 +114,9 @@ static std::string convert_to_native( const std::string & str ); +#if !defined(UNICODE) static std::string StringEncode( const std::wstring &src, UINT codepage ); +#endif static std::wstring StringDecode( const std::string & src, UINT codepage ); @@ -194,6 +196,7 @@ return result; } +#if !defined(UNICODE) static std::string StringEncode( const std::wstring &src, UINT codepage ) { int required_size = WideCharToMultiByte( codepage, 0, src.c_str(), -1, nullptr, 0, nullptr, nullptr); @@ -205,6 +208,7 @@ WideCharToMultiByte( codepage, 0, src.c_str(), -1, encoded_string.data(), encoded_string.size(), nullptr, nullptr); return encoded_string.data(); } +#endif static std::wstring StringDecode( const std::string & src, UINT codepage ) { |