1
0
mirror of synced 2025-01-11 05:42:15 +01:00

impr: Removed more instanced of codecvt

This commit is contained in:
WerWolv 2024-12-14 22:39:07 +01:00
parent f39f395393
commit 21506578f5
5 changed files with 4 additions and 9 deletions

@ -1 +1 @@
Subproject commit 759035de2d966c07f81638e2a1f80539a0f0daec
Subproject commit 2d2329aa12c34795850775c60d6d6c30f18842b1

@ -1 +1 @@
Subproject commit c7cd053979fec6fffe4d924593e97efa65a8a4d5
Subproject commit 7a0e7800efa376559c71f65c95f9e2c778008033

View File

@ -14,7 +14,6 @@
#if defined(OS_WINDOWS)
#include <windows.h>
#include <shellapi.h>
#include <codecvt>
#endif
namespace hex::init {

View File

@ -10,7 +10,6 @@
#include <hex/providers/provider.hpp>
#include <cstring>
#include <codecvt>
#include <string>
#include <imgui_internal.h>

View File

@ -9,7 +9,6 @@
#include <fonts/vscode_icons.hpp>
#include <bit>
#include <codecvt>
namespace hex::plugin::builtin {
@ -286,8 +285,7 @@ namespace hex::plugin::builtin {
break;
}
case Encoding::UTF16: {
std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> convert16;
auto utf16 = convert16.from_bytes(s_inputString);
auto utf16 = wolv::util::utf8ToUtf16(s_inputString);
for (auto &c: utf16) {
swapEndianness(c, Encoding::UTF16, m_stringEndianness);
@ -299,8 +297,7 @@ namespace hex::plugin::builtin {
break;
}
case Encoding::UTF32: {
std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> convert32;
auto utf32 = convert32.from_bytes(s_inputString);
auto utf32 = wolv::util::utf8ToUtf32(s_inputString);
for (auto &c: utf32) {
swapEndianness(c, Encoding::UTF32, m_stringEndianness);