mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Various MSVC warnings
This commit is contained in:
@@ -368,8 +368,11 @@ namespace hex::plugin::builtin {
|
||||
},
|
||||
[](const std::string &value, std::endian endian) -> std::vector<u8> {
|
||||
std::vector<u8> bytes;
|
||||
auto wideString = wolv::util::utf8ToWstring(value.c_str(), "Invalid");
|
||||
std::copy(wideString.begin(), wideString.end(), std::back_inserter(bytes));
|
||||
auto wideString = wolv::util::utf8ToWstring(value.c_str(), "");
|
||||
if (wideString.empty()) return bytes;
|
||||
|
||||
bytes.resize(wideString.size() * sizeof(wchar_t));
|
||||
std::memcpy(bytes.data(), wideString.data(), bytes.size());
|
||||
|
||||
if (endian != std::endian::native)
|
||||
std::reverse(bytes.begin(), bytes.end());
|
||||
|
||||
Reference in New Issue
Block a user