diff options
| author | 2022-11-29 23:03:30 -0500 | |
|---|---|---|
| committer | 2022-11-30 18:26:26 -0500 | |
| commit | 3c39c0ac3e710df45af1f812a9015378b2d7ada4 (patch) | |
| tree | 3132d1ca64443c3c643adaedf0f427d99b166b2d /src/common/string_util.cpp | |
| parent | CMake: Disable PCH on MSVC + Buildcache configs (diff) | |
| download | yuzu-3c39c0ac3e710df45af1f812a9015378b2d7ada4.tar.gz yuzu-3c39c0ac3e710df45af1f812a9015378b2d7ada4.tar.xz yuzu-3c39c0ac3e710df45af1f812a9015378b2d7ada4.zip | |
string_util: Fix Mingw compile error
Co-Authored-By: liamwhite <9658600+liamwhite@users.noreply.github.com>
Diffstat (limited to 'src/common/string_util.cpp')
| -rw-r--r-- | src/common/string_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 7a495bc79..b26db4796 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -141,7 +141,7 @@ static std::wstring CPToUTF16(u32 code_page, const std::string& input) { | |||
| 141 | MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), nullptr, 0); | 141 | MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), nullptr, 0); |
| 142 | 142 | ||
| 143 | if (size == 0) { | 143 | if (size == 0) { |
| 144 | return L""; | 144 | return {}; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | std::wstring output(size, L'\0'); | 147 | std::wstring output(size, L'\0'); |
| @@ -158,7 +158,7 @@ std::string UTF16ToUTF8(const std::wstring& input) { | |||
| 158 | const auto size = WideCharToMultiByte(CP_UTF8, 0, input.data(), static_cast<int>(input.size()), | 158 | const auto size = WideCharToMultiByte(CP_UTF8, 0, input.data(), static_cast<int>(input.size()), |
| 159 | nullptr, 0, nullptr, nullptr); | 159 | nullptr, 0, nullptr, nullptr); |
| 160 | if (size == 0) { | 160 | if (size == 0) { |
| 161 | return ""; | 161 | return {}; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | std::string output(size, '\0'); | 164 | std::string output(size, '\0'); |