aboutsummaryrefslogtreecommitdiff
path: root/src/common/String.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-12 02:30:25 +0800
committercrupest <crupest@outlook.com>2022-01-12 02:30:25 +0800
commit882d843083895f4905571dc273e801ee18fd5984 (patch)
tree163890b8ccb64b8eff28af558ac803affe392488 /src/common/String.cpp
parent01f98ce88950cdb729f5db58bf26f2fffa1c326c (diff)
downloadcru-882d843083895f4905571dc273e801ee18fd5984.tar.gz
cru-882d843083895f4905571dc273e801ee18fd5984.tar.bz2
cru-882d843083895f4905571dc273e801ee18fd5984.zip
...
Diffstat (limited to 'src/common/String.cpp')
-rw-r--r--src/common/String.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/String.cpp b/src/common/String.cpp
index 1c2ff022..ca16cee7 100644
--- a/src/common/String.cpp
+++ b/src/common/String.cpp
@@ -45,7 +45,7 @@ String::String(std::initializer_list<char16_t> l)
#ifdef CRU_PLATFORM_WINDOWS
String::String(const wchar_t* str) : String(str, GetStrSize(str)) {}
String::String(const wchar_t* str, Index size)
- : String(reinterpret_cast<const std::uint16_t*>(str), size) {}
+ : String(reinterpret_cast<const char16_t*>(str), size) {}
#endif
String::String(const String& other) {
@@ -426,7 +426,7 @@ std::vector<FormatToken> ParseToFormatTokenList(const String& str) {
void FormatAppendFromFormatTokenList(
String& current, const std::vector<FormatToken>& format_token_list,
Index index) {
- for (Index i = index; i < format_token_list.size(); i++) {
+ for (Index i = index; i < static_cast<Index>(format_token_list.size()); i++) {
const auto& token = format_token_list[i];
if (token.type == FormatTokenType::PlaceHolder) {
current += u"{}";