From 00556023c2ff6096d4a26b764cdfdb474fbb20b6 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 10 Aug 2023 04:07:46 -0700 Subject: [PATCH] Remove unnecessary WIN32 file handling TODOs With WOW, all allocations from 64-bit code use the full address space and limiting is handled on the syscall thunk side so theres need to worry about STL allocations stealing AS. --- FEXCore/Source/Utils/FileLoading.cpp | 1 - FEXHeaderUtils/FEXHeaderUtils/Filesystem.h | 3 --- 2 files changed, 4 deletions(-) diff --git a/FEXCore/Source/Utils/FileLoading.cpp b/FEXCore/Source/Utils/FileLoading.cpp index cbf4f50ce..8d17930ea 100644 --- a/FEXCore/Source/Utils/FileLoading.cpp +++ b/FEXCore/Source/Utils/FileLoading.cpp @@ -56,7 +56,6 @@ ssize_t LoadFileToBuffer(const fextl::string &Filepath, std::span Buffer) } #else -// TODO: Should be rewritten using WIN32 specific APIs. template static bool LoadFileImpl(T &Data, const fextl::string &Filepath, size_t FixedSize) { std::ifstream f(Filepath, std::ios::binary | std::ios::ate); diff --git a/FEXHeaderUtils/FEXHeaderUtils/Filesystem.h b/FEXHeaderUtils/FEXHeaderUtils/Filesystem.h index 71420b596..1b4002483 100644 --- a/FEXHeaderUtils/FEXHeaderUtils/Filesystem.h +++ b/FEXHeaderUtils/FEXHeaderUtils/Filesystem.h @@ -73,7 +73,6 @@ namespace FHU::Filesystem { return CreateDirectoryResult::ERROR; } #else - // TODO: Should be rewritten using WIN32 specific APIs. inline CreateDirectoryResult CreateDirectory(const fextl::string &Path) { std::error_code ec; if (std::filesystem::exists(Path, ec)) { @@ -226,7 +225,6 @@ namespace FHU::Filesystem { return false; } #else - // TODO: Should be rewritten using WIN32 specific APIs. inline bool CopyFile(const fextl::string &From, const fextl::string &To, CopyOptions Options = CopyOptions::NONE) { std::filesystem::copy_options options{}; if (Options == CopyOptions::SKIP_EXISTING) { @@ -359,7 +357,6 @@ namespace FHU::Filesystem { return realpath(Path, Fill); } #else - // TODO: Should be rewritten using WIN32 specific APIs. inline char *Absolute(const char *Path, char Fill[PATH_MAX]) { std::error_code ec; const auto PathAbsolute = std::filesystem::absolute(Path, ec);