mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
StringUtil: Replace strerror with Common::LastStrerrorString.
This commit is contained in:
parent
0ebc54a0fa
commit
5650b2ef37
@ -22,6 +22,7 @@
|
|||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <fmt/ranges.h>
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
|
#include "Common/CommonFuncs.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
@ -31,7 +32,6 @@
|
|||||||
constexpr u32 CODEPAGE_SHIFT_JIS = 932;
|
constexpr u32 CODEPAGE_SHIFT_JIS = 932;
|
||||||
constexpr u32 CODEPAGE_WINDOWS_1252 = 1252;
|
constexpr u32 CODEPAGE_WINDOWS_1252 = 1252;
|
||||||
|
|
||||||
#include "Common/CommonFuncs.h"
|
|
||||||
#include "Common/Swap.h"
|
#include "Common/Swap.h"
|
||||||
#else
|
#else
|
||||||
#include <cerrno>
|
#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);
|
auto* const conv_desc = iconv_open(tocode, fromcode);
|
||||||
if ((iconv_t)-1 == conv_desc)
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -522,7 +523,7 @@ static std::string CodeTo(const char* tocode, const char* fromcode, std::basic_s
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, strerror(errno));
|
ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, Common::LastStrerrorString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user