mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -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());
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
private:
|
||||
std::optional<float> m_value;
|
||||
std::optional<double> m_value;
|
||||
};
|
||||
|
||||
class NodeDisplayBuffer : public dp::Node {
|
||||
|
||||
@@ -1493,7 +1493,7 @@ namespace hex::plugin::builtin {
|
||||
if (m_lastEvaluationError->has_value())
|
||||
message = processMessage((*m_lastEvaluationError)->message);
|
||||
auto key = TextEditor::Coordinates(location.line, location.column);
|
||||
errorMarkers[key] = std::make_pair(location.length, message);
|
||||
errorMarkers[key] = std::make_pair(u32(location.length), message);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user