diff options
author | unknown <for.oliver.kirkham@gmail.com> | 2023-02-14 13:39:33 +0000 |
---|---|---|
committer | unknown <for.oliver.kirkham@gmail.com> | 2023-02-14 13:39:33 +0000 |
commit | 263af88bb67349b5193dea6dac33664fc70bfede (patch) | |
tree | 88dd00e65af78147c336138e8ed3997030234830 /NorthstarDLL/core | |
parent | f30f6b002646bbb0bb0a78ed0e253de0ae371c68 (diff) | |
download | NorthstarLauncher-263af88bb67349b5193dea6dac33664fc70bfede.tar.gz NorthstarLauncher-263af88bb67349b5193dea6dac33664fc70bfede.zip |
fix formatting
Diffstat (limited to 'NorthstarDLL/core')
-rw-r--r-- | NorthstarDLL/core/hooks.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/core/hooks.h | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/NorthstarDLL/core/hooks.cpp b/NorthstarDLL/core/hooks.cpp index 91cb9a90..d3b9cfc5 100644 --- a/NorthstarDLL/core/hooks.cpp +++ b/NorthstarDLL/core/hooks.cpp @@ -68,7 +68,7 @@ void __fileAutohook::Dispatch() { for (__autovar* var : vars) var->Dispatch(); - + for (__autohook* hook : hooks) hook->Dispatch(); } diff --git a/NorthstarDLL/core/hooks.h b/NorthstarDLL/core/hooks.h index 2f7e21b4..0eb3f7fb 100644 --- a/NorthstarDLL/core/hooks.h +++ b/NorthstarDLL/core/hooks.h @@ -307,10 +307,17 @@ class __autovar }; // VAR_AT(engine.dll+0x404, ConVar*, Cvar_host_timescale) -#define VAR_AT(addrString, type, name) \ -type name; namespace { __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); } +#define VAR_AT(addrString, type, name) \ + type name; \ + namespace \ + { \ + __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \ + } // FUNCTION_AT(engine.dll + 0xDEADBEEF, void, __fastcall, SomeFunc, (void* a1)) -#define FUNCTION_AT(addrString, type, callingConvention, name, args) \ -type(*callingConvention name) args; namespace { __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); } - +#define FUNCTION_AT(addrString, type, callingConvention, name, args) \ + type(*callingConvention name) args; \ + namespace \ + { \ + __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \ + } |