Skip to content

Commit

Permalink
[Ref] xmp-openmpt: Silence unused function warning with UNICODE gcc.
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22734 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Jan 2, 2025
1 parent eb106eb commit 0dff619
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libopenmpt/xmp-openmpt/xmp-openmpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ static void apply_and_save_options();

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 );

Expand Down Expand Up @@ -184,6 +186,7 @@ static std::string convert_to_native( const std::string & str ) {
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);
Expand All @@ -195,6 +198,7 @@ static std::string StringEncode( const std::wstring &src, UINT codepage )
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 )
{
Expand Down

0 comments on commit 0dff619

Please sign in to comment.