1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Part of #11158: Remove more C-style casts (#11743)

This commit is contained in:
Michael Steenbeek
2020-05-14 02:22:50 +02:00
committed by GitHub
parent 32609791de
commit f0bd05cf6d
17 changed files with 40 additions and 39 deletions

View File

@@ -85,7 +85,7 @@ namespace String
icu::UnicodeString str = icu::UnicodeString::fromUTF32(reinterpret_cast<const UChar32*>(src.data()), src.length());
# elif U_SIZEOF_WCHAR_T == 2
std::wstring wstr = std::wstring(src);
icu::UnicodeString str = icu::UnicodeString((const wchar_t*)wstr.c_str());
icu::UnicodeString str = icu::UnicodeString(static_cast<const wchar_t*>(wstr.c_str()));
# else
# error Unsupported U_SIZEOF_WCHAR_T size
# endif
@@ -120,7 +120,7 @@ namespace String
# elif U_SIZEOF_WCHAR_T == 2
const char16_t* buffer = str.getBuffer();
std::wstring result = (wchar_t*)buffer;
std::wstring result = static_cast<wchar_t*>(buffer);
# else
# error Unsupported U_SIZEOF_WCHAR_T size