diff options
| author | 2015-02-14 15:50:26 -0500 | |
|---|---|---|
| committer | 2015-02-14 15:50:26 -0500 | |
| commit | 12181c8a64678e73281e893b6ba108d5a125c1aa (patch) | |
| tree | 831883189eb5c846b619c20e22e1015c5c140c63 /src/common | |
| parent | Merge pull request #572 from lioncash/prototypes (diff) | |
| parent | Build: Fixed some warnings (diff) | |
| download | yuzu-12181c8a64678e73281e893b6ba108d5a125c1aa.tar.gz yuzu-12181c8a64678e73281e893b6ba108d5a125c1aa.tar.xz yuzu-12181c8a64678e73281e893b6ba108d5a125c1aa.zip | |
Merge pull request #529 from Subv/master
Build: Fixed some warnings
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/string_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index b3b772bd9..3264dd51a 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -426,7 +426,7 @@ std::u16string UTF8ToUTF16(const std::string& input) | |||
| 426 | 426 | ||
| 427 | static std::string UTF16ToUTF8(const std::wstring& input) | 427 | static std::string UTF16ToUTF8(const std::wstring& input) |
| 428 | { | 428 | { |
| 429 | auto const size = WideCharToMultiByte(CP_UTF8, 0, input.data(), input.size(), nullptr, 0, nullptr, nullptr); | 429 | auto const size = WideCharToMultiByte(CP_UTF8, 0, input.data(), static_cast<int>(input.size()), nullptr, 0, nullptr, nullptr); |
| 430 | 430 | ||
| 431 | std::string output; | 431 | std::string output; |
| 432 | output.resize(size); | 432 | output.resize(size); |
| @@ -439,12 +439,12 @@ static std::string UTF16ToUTF8(const std::wstring& input) | |||
| 439 | 439 | ||
| 440 | static std::wstring CPToUTF16(u32 code_page, const std::string& input) | 440 | static std::wstring CPToUTF16(u32 code_page, const std::string& input) |
| 441 | { | 441 | { |
| 442 | auto const size = MultiByteToWideChar(code_page, 0, input.data(), input.size(), nullptr, 0); | 442 | auto const size = MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), nullptr, 0); |
| 443 | 443 | ||
| 444 | std::wstring output; | 444 | std::wstring output; |
| 445 | output.resize(size); | 445 | output.resize(size); |
| 446 | 446 | ||
| 447 | if (size == 0 || size != MultiByteToWideChar(code_page, 0, input.data(), input.size(), &output[0], output.size())) | 447 | if (size == 0 || size != MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), &output[0], static_cast<int>(output.size()))) |
| 448 | output.clear(); | 448 | output.clear(); |
| 449 | 449 | ||
| 450 | return output; | 450 | return output; |