From 4c8936ff2e733dedd456d7ef9536a4b114ebaa0a Mon Sep 17 00:00:00 2001 From: Patrick Mollohan <14967142+patrickmollohan@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:32:19 -0400 Subject: [PATCH] Convert "typedef" to "using" --- src/mod_loader.cpp | 2 +- src/mod_loader.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mod_loader.cpp b/src/mod_loader.cpp index 6589827..b21d600 100644 --- a/src/mod_loader.cpp +++ b/src/mod_loader.cpp @@ -1,6 +1,6 @@ #include "mod_loader.hpp" -ModLoader::open_file_stream_proc oldOpenFileStream = nullptr; +ModLoader::open_file_stream_proc ModLoader::oldOpenFileStream = nullptr; int ModLoader::pattern_size; unsigned char* ModLoader::pattern; diff --git a/src/mod_loader.hpp b/src/mod_loader.hpp index 3474404..264c294 100644 --- a/src/mod_loader.hpp +++ b/src/mod_loader.hpp @@ -12,11 +12,12 @@ class ModLoader { static bool Enable(); static void Disable(); - typedef bool(__fastcall* open_file_stream_proc)(__int64 stream, LPCSTR file_path, unsigned int flags); - private: + using open_file_stream_proc = bool(__fastcall*)(uintptr_t stream, LPCSTR file_path, unsigned int flags); + static bool __fastcall HookOpenFileStream(uintptr_t stream, LPCSTR file_path, unsigned int flags); + static open_file_stream_proc oldOpenFileStream; static int pattern_size; static unsigned char* pattern; static unsigned char* mask;