diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-10-15 18:48:43 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-11-02 00:36:04 -0500 |
| commit | 5650b2ef37546aca626da078a0aa20963a314824 (patch) | |
| tree | ec6a84d0a46e727c83b70c77f129565fdd0d6f80 /Source/Core/Common/StringUtil.cpp | |
| parent | 0ebc54a0fa37bb9c9ff3969a6a025dc04f32c0b1 (diff) | |
StringUtil: Replace strerror with Common::LastStrerrorString.
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/StringUtil.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 326a8e19eb..bea9ac5d9d 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -22,6 +22,7 @@ #include <fmt/format.h> #include <fmt/ranges.h> +#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/Logging/Log.h" @@ -31,7 +32,6 @@ constexpr u32 CODEPAGE_SHIFT_JIS = 932; constexpr u32 CODEPAGE_WINDOWS_1252 = 1252; -#include "Common/CommonFuncs.h" #include "Common/Swap.h" #else #include <cerrno> @@ -489,7 +489,8 @@ static std::string CodeTo(const char* tocode, const char* fromcode, std::basic_s auto* const conv_desc = iconv_open(tocode, fromcode); if ((iconv_t)-1 == conv_desc) { - ERROR_LOG_FMT(COMMON, "Iconv initialization failure [{}]: {}", fromcode, strerror(errno)); + ERROR_LOG_FMT(COMMON, "Iconv initialization failure [{}]: {}", fromcode, + Common::LastStrerrorString()); } else { @@ -522,7 +523,7 @@ static std::string CodeTo(const char* tocode, const char* fromcode, std::basic_s } else { - ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, strerror(errno)); + ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, Common::LastStrerrorString()); break; } } |
