Skip to content

Commit 3f9012b

Browse files
committed
OrcLib: Fmt: std_error_code: remove dependency to Iconv.h
1 parent 2382204 commit 3f9012b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OrcLib/Text/Fmt/std_error_code.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include <fmt/format.h>
1414
#include <fmt/xchar.h>
1515

16-
#include "Text/Iconv.h"
17-
1816
template <>
1917
struct fmt::formatter<std::error_code> : public fmt::formatter<std::string_view>
2018
{
@@ -74,7 +72,9 @@ struct fmt::formatter<std::error_code, wchar_t> : public fmt::formatter<std::wst
7472
message = message.substr(0, pos);
7573
}
7674

77-
const auto utf16 = Orc::ToUtf16(message);
75+
// It is expected that ec.message() only return ansi character set
76+
std::wstring utf16;
77+
std::copy(std::cbegin(message), std::cend(message), std::back_inserter(utf16));
7878
fmt::format_to(std::back_inserter(s), L": {}", utf16);
7979
}
8080

0 commit comments

Comments
 (0)