diff --git a/include/providers/file_provider.hpp b/include/providers/file_provider.hpp index 6202f8ea0..f45e16e7b 100644 --- a/include/providers/file_provider.hpp +++ b/include/providers/file_provider.hpp @@ -1,7 +1,6 @@ #pragma once #include "providers/provider.hpp" -#include "helpers/utils.hpp" #include @@ -11,6 +10,8 @@ #include #else #include +#include +#include #endif namespace hex::prv { diff --git a/source/providers/file_provider.cpp b/source/providers/file_provider.cpp index f1244ab4e..d61025076 100644 --- a/source/providers/file_provider.cpp +++ b/source/providers/file_provider.cpp @@ -1,13 +1,8 @@ #include "providers/file_provider.hpp" -#undef __STRICT_ANSI__ -#include - -#include -#include #include +#include -#include "helpers/utils.hpp" #include "helpers/project_file_handler.hpp" namespace hex::prv { @@ -118,7 +113,7 @@ namespace hex::prv { if ((offset + size) > this->getSize() || buffer == nullptr || size == 0) return; - memcpy(buffer, reinterpret_cast(this->m_mappedFile) + offset, size); + std::memcpy(buffer, reinterpret_cast(this->m_mappedFile) + offset, size); for (u64 i = 0; i < size; i++) if (this->m_patches.back().contains(offset + i)) @@ -139,14 +134,14 @@ namespace hex::prv { if ((offset + size) > this->getSize() || buffer == nullptr || size == 0) return; - memcpy(buffer, reinterpret_cast(this->m_mappedFile) + offset, size); + std::memcpy(buffer, reinterpret_cast(this->m_mappedFile) + offset, size); } void FileProvider::writeRaw(u64 offset, const void *buffer, size_t size) { if (buffer == nullptr || size == 0) return; - memcpy(reinterpret_cast(this->m_mappedFile) + offset, buffer, size); + std::memcpy(reinterpret_cast(this->m_mappedFile) + offset, buffer, size); } size_t FileProvider::getActualSize() { return this->m_fileSize;