2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

Update fmtlib

This commit is contained in:
Jack Andersen
2020-04-11 12:48:11 -10:00
parent 7ce829d134
commit 6a8714c1f3
31 changed files with 362 additions and 361 deletions

View File

@@ -11,7 +11,7 @@ std::string WideToUTF8(std::wstring_view src) {
utf8proc_uint8_t mb[4];
utf8proc_ssize_t c = utf8proc_encode_char(utf8proc_int32_t(ch), mb);
if (c < 0) {
Log.report(logvisor::Warning, fmt("invalid UTF-8 character while encoding"));
Log.report(logvisor::Warning, FMT_STRING("invalid UTF-8 character while encoding"));
return retval;
}
retval.append(reinterpret_cast<char*>(mb), c);
@@ -26,7 +26,7 @@ std::string Char16ToUTF8(std::u16string_view src) {
utf8proc_uint8_t mb[4];
utf8proc_ssize_t c = utf8proc_encode_char(utf8proc_int32_t(ch), mb);
if (c < 0) {
Log.report(logvisor::Warning, fmt("invalid UTF-8 character while encoding"));
Log.report(logvisor::Warning, FMT_STRING("invalid UTF-8 character while encoding"));
return retval;
}
retval.append(reinterpret_cast<char*>(mb), c);
@@ -42,7 +42,7 @@ std::wstring UTF8ToWide(std::string_view src) {
utf8proc_int32_t wc;
utf8proc_ssize_t len = utf8proc_iterate(buf, -1, &wc);
if (len < 0) {
Log.report(logvisor::Warning, fmt("invalid UTF-8 character while decoding"));
Log.report(logvisor::Warning, FMT_STRING("invalid UTF-8 character while decoding"));
return retval;
}
buf += len;
@@ -59,7 +59,7 @@ std::u16string UTF8ToChar16(std::string_view src) {
utf8proc_int32_t wc;
utf8proc_ssize_t len = utf8proc_iterate(buf, -1, &wc);
if (len < 0) {
Log.report(logvisor::Warning, fmt("invalid UTF-8 character while decoding"));
Log.report(logvisor::Warning, FMT_STRING("invalid UTF-8 character while decoding"));
return retval;
}
buf += len;