Skip to content

Commit

Permalink
Merged revision(s) 22734 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Ref] xmp-openmpt: Silence unused function warning with UNICODE gcc.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@22737 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Jan 2, 2025
1 parent ae91f7f commit 5f32467
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 @@ -114,7 +114,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 @@ -194,6 +196,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 @@ -205,6 +208,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 5f32467

Please sign in to comment.