diff options
| author | 2018-04-26 19:17:35 -0400 | |
|---|---|---|
| committer | 2018-04-26 20:09:58 -0400 | |
| commit | 3cfe77ae758d02a969831180fa3100d269237343 (patch) | |
| tree | 8cfdf870baf70a5d260a0840e25f1a42a9aed362 /src/common/string_util.cpp | |
| parent | Merge pull request #402 from lioncash/core (diff) | |
| download | yuzu-3cfe77ae758d02a969831180fa3100d269237343.tar.gz yuzu-3cfe77ae758d02a969831180fa3100d269237343.tar.xz yuzu-3cfe77ae758d02a969831180fa3100d269237343.zip | |
common: Move logging macros over to new fmt-capable macros where applicable
Diffstat (limited to 'src/common/string_util.cpp')
| -rw-r--r-- | src/common/string_util.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 124a8937f..96c52e3ba 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -107,7 +107,7 @@ std::string StringFromFormat(const char* format, ...) { | |||
| 107 | #else | 107 | #else |
| 108 | va_start(args, format); | 108 | va_start(args, format); |
| 109 | if (vasprintf(&buf, format, args) < 0) | 109 | if (vasprintf(&buf, format, args) < 0) |
| 110 | LOG_ERROR(Common, "Unable to allocate memory for string"); | 110 | NGLOG_ERROR(Common, "Unable to allocate memory for string"); |
| 111 | va_end(args); | 111 | va_end(args); |
| 112 | 112 | ||
| 113 | std::string temp = buf; | 113 | std::string temp = buf; |
| @@ -347,7 +347,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 347 | 347 | ||
| 348 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); | 348 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); |
| 349 | if ((iconv_t)(-1) == conv_desc) { | 349 | if ((iconv_t)(-1) == conv_desc) { |
| 350 | LOG_ERROR(Common, "Iconv initialization failure [%s]: %s", fromcode, strerror(errno)); | 350 | NGLOG_ERROR(Common, "Iconv initialization failure [{}]: {}", fromcode, strerror(errno)); |
| 351 | iconv_close(conv_desc); | 351 | iconv_close(conv_desc); |
| 352 | return {}; | 352 | return {}; |
| 353 | } | 353 | } |
| @@ -376,7 +376,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 376 | ++src_buffer; | 376 | ++src_buffer; |
| 377 | } | 377 | } |
| 378 | } else { | 378 | } else { |
| 379 | LOG_ERROR(Common, "iconv failure [%s]: %s", fromcode, strerror(errno)); | 379 | NGLOG_ERROR(Common, "iconv failure [{}]: {}", fromcode, strerror(errno)); |
| 380 | break; | 380 | break; |
| 381 | } | 381 | } |
| 382 | } | 382 | } |
| @@ -395,7 +395,7 @@ std::u16string UTF8ToUTF16(const std::string& input) { | |||
| 395 | 395 | ||
| 396 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); | 396 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); |
| 397 | if ((iconv_t)(-1) == conv_desc) { | 397 | if ((iconv_t)(-1) == conv_desc) { |
| 398 | LOG_ERROR(Common, "Iconv initialization failure [UTF-8]: %s", strerror(errno)); | 398 | NGLOG_ERROR(Common, "Iconv initialization failure [UTF-8]: {}", strerror(errno)); |
| 399 | iconv_close(conv_desc); | 399 | iconv_close(conv_desc); |
| 400 | return {}; | 400 | return {}; |
| 401 | } | 401 | } |
| @@ -424,7 +424,7 @@ std::u16string UTF8ToUTF16(const std::string& input) { | |||
| 424 | ++src_buffer; | 424 | ++src_buffer; |
| 425 | } | 425 | } |
| 426 | } else { | 426 | } else { |
| 427 | LOG_ERROR(Common, "iconv failure [UTF-8]: %s", strerror(errno)); | 427 | NGLOG_ERROR(Common, "iconv failure [UTF-8]: {}", strerror(errno)); |
| 428 | break; | 428 | break; |
| 429 | } | 429 | } |
| 430 | } | 430 | } |