Kawe Mazidjatari 87f9420889 Globally reduce the use of auto for function pointer declarations
Find regex pattern:
inline auto ([a-zA-Z0-9_]+) = ([a-zA-Z0-9_]+)\.RCast<([a-zA-Z0-9_:<>*]+) *\(\*\)\(([^)]*)\)>\(\);
Replace regex pattern:
inline $3(*$1)($4);

This commit also removes the unnecessary initialization (which was required to type the auto variables),
and therefore removed 6kb of unnecessary dynamic initialization code.
2023-07-02 23:01:29 +02:00

25 lines
1.0 KiB
C++

#pragma once
/* ==== PRX ============================================================================================================================================================= */
inline CMemory p_exit_or_terminate_process;
inline void(*v_exit_or_terminate_process)(UINT uExitCode);
///////////////////////////////////////////////////////////////////////////////
class VPRX : public IDetour
{
virtual void GetAdr(void) const
{
LogFunAdr("exit_or_terminate_process", p_exit_or_terminate_process.GetPtr());
}
virtual void GetFun(void) const
{
p_exit_or_terminate_process = g_GameDll.FindPatternSIMD("40 53 48 83 EC 20 8B D9 E8 ?? ?? ?? ?? 84 C0");
v_exit_or_terminate_process = p_exit_or_terminate_process.RCast<void(*)(UINT uExitCode)>(); /*40 53 48 83 EC 20 8B D9 E8 ? ? ? ? 84 C0 */
}
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const;
virtual void Detach(void) const;
};
///////////////////////////////////////////////////////////////////////////////