Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Stecker
1ff665a040
Merge pull request #23 from A1mDev/master
Some checks are pending
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (clang, clang++, ubuntu-latest) (push) Waiting to run
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (msvc, windows-latest) (push) Waiting to run
Fix build warnings
2025-10-23 18:07:05 -05:00
A1mDev
2a1d8d1ace Fix build warnings 2025-10-23 13:38:46 +07:00

View File

@ -107,18 +107,17 @@ inline const CBaseEntity *UTIL_EntityFromEntityHandle( const IHandleEntity *pCon
return pUnk->GetBaseEntity();
}
#define DETOUR_DECL_STATIC2_REGPARM(name, ret, p1type, p1name, p2type, p2name) \
ret (*name##_Actual)(p1type, p2type) __attribute__((regparm(2))) = NULL; \
ret name(p1type p1name, p2type p2name) __attribute__((regparm(2)))
#define DETOUR_DECL_STATIC2_FASTCALL(name, ret, p1type, p1name, p2type, p2name) \
ret (__fastcall *name##_Actual)(p1type, p2type) = NULL; \
ret __fastcall name(p1type p1name, p2type p2name)
#if SOURCE_ENGINE == SE_TF2 && defined(PLATFORM_LINUX) && defined(__i386__)
#define DETOUR_DECL_STATIC2_REGPARM(name, ret, p1type, p1name, p2type, p2name) \
ret (*name##_Actual)(p1type, p2type) __attribute__((regparm(2))) = NULL; \
ret name(p1type p1name, p2type p2name)
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2_REGPARM
#elif SOURCE_ENGINE == SE_CSGO && defined(PLATFORM_WINDOWS)
#define DETOUR_DECL_STATIC2_FASTCALL(name, ret, p1type, p1name, p2type, p2name) \
ret (__fastcall *name##_Actual)(p1type, p2type) = NULL; \
ret __fastcall name(p1type p1name, p2type p2name)
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2_FASTCALL
#else
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2