Skip to content

Commit

Permalink
Shut msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenzzer authored and psychonic committed Feb 8, 2024
1 parent f950db7 commit 3740821
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion core/sourcehook/generate/sourcehook.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,10 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
/* patch mfp */ \
*reinterpret_cast<void**>(&mfp) = *reinterpret_cast<void**>(vfnptr); \
if (sizeof(mfp) == 2*sizeof(void*)) /* gcc */ \
*(reinterpret_cast<void**>(&mfp) + 1) = 0; \
{ \
void** pleaseShutUpMsvc = reinterpret_cast<void**>(&mfp); \
pleaseShutUpMsvc[1] = 0; \
} \
return SH_MFHCls(hookname)::CallEC(reinterpret_cast< ::SourceHook::EmptyClass* >(ptr), mfp, vfnptr, SH_GLOB_SHPTR); \
} \
void __SourceHook_FHM_Reconfigure##hookname(int p_vtblindex, int p_vtbloffs, int p_thisptroffs) \
Expand Down
5 changes: 4 additions & 1 deletion core/sourcehook/sourcehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,10 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
/* patch mfp */ \
*reinterpret_cast<void**>(&mfp) = *reinterpret_cast<void**>(vfnptr); \
if (sizeof(mfp) == 2*sizeof(void*)) /* gcc */ \
*(reinterpret_cast<void**>(&mfp) + 1) = 0; \
{ \
void** pleaseShutUpMsvc = reinterpret_cast<void**>(&mfp); \
pleaseShutUpMsvc[1] = 0; \
} \
return SH_MFHCls(hookname)::CallEC(reinterpret_cast< ::SourceHook::EmptyClass* >(ptr), mfp, vfnptr, SH_GLOB_SHPTR); \
} \
void __SourceHook_FHM_Reconfigure##hookname(int p_vtblindex, int p_vtbloffs, int p_thisptroffs) \
Expand Down

0 comments on commit 3740821

Please sign in to comment.