mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
fix: Various build errors
This commit is contained in:
@@ -63,6 +63,9 @@ namespace hex {
|
||||
[[nodiscard]] std::string to_string(u128 value);
|
||||
[[nodiscard]] std::string to_string(i128 value);
|
||||
|
||||
[[nodiscard]] std::string toLower(std::string string);
|
||||
[[nodiscard]] std::string toUpper(std::string string);
|
||||
|
||||
[[nodiscard]] std::vector<u8> parseHexString(std::string string);
|
||||
[[nodiscard]] std::optional<u8> parseBinaryString(const std::string &string);
|
||||
[[nodiscard]] std::string toByteString(u64 bytes);
|
||||
|
||||
@@ -43,11 +43,11 @@ namespace hex {
|
||||
return this->m_patches.rbegin()->first;
|
||||
}
|
||||
|
||||
void resizeRaw(size_t newSize) override {
|
||||
void resizeRaw(u64 newSize) override {
|
||||
hex::unused(newSize);
|
||||
}
|
||||
|
||||
void insertRaw(u64 offset, size_t size) override {
|
||||
void insertRaw(u64 offset, u64 size) override {
|
||||
std::vector<std::pair<u64, u8>> patchesToMove;
|
||||
|
||||
for (auto &[address, value] : this->m_patches) {
|
||||
@@ -61,7 +61,7 @@ namespace hex {
|
||||
this->m_patches.insert({ address + size, value });
|
||||
}
|
||||
|
||||
void removeRaw(u64 offset, size_t size) override {
|
||||
void removeRaw(u64 offset, u64 size) override {
|
||||
std::vector<std::pair<u64, u8>> patchesToMove;
|
||||
|
||||
for (auto &[address, value] : this->m_patches) {
|
||||
|
||||
@@ -71,6 +71,20 @@ namespace hex {
|
||||
return { data + index + 1 };
|
||||
}
|
||||
|
||||
std::string toLower(std::string string) {
|
||||
for (char &c : string)
|
||||
c = std::tolower(c);
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
std::string toUpper(std::string string) {
|
||||
for (char &c : string)
|
||||
c = std::toupper(c);
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
std::vector<u8> parseHexString(std::string string) {
|
||||
if (string.empty())
|
||||
return { };
|
||||
|
||||
Reference in New Issue
Block a user