sourcehook/test/test2.cpp
changeset 324 257f0837a885
parent 294 0d87bc8606f8
child 328 3a04ef79edf1
     1.1 --- a/sourcehook/test/test2.cpp	Mon May 07 18:33:34 2007 +0000
     1.2 +++ b/sourcehook/test/test2.cpp	Mon May 07 18:35:59 2007 +0000
     1.3 @@ -50,6 +50,11 @@
     1.4  		}
     1.5  	};
     1.6  
     1.7 +	// GCC's optimizer is too good. I had to add this in order to make it execute a virtual table lookup!
     1.8 +	class Whatever : public IGaben
     1.9 +	{
    1.10 +	};
    1.11 +
    1.12  	SH_DECL_HOOK0_void(IGaben, EatYams, SH_NOATTRIB, 0);
    1.13  	SH_DECL_HOOK1(IGaben, EatYams, const, 1, bool, const char *);
    1.14  	SH_DECL_HOOK2_void_vafmt(IGaben, Vafmt1, SH_NOATTRIB, 0, bool, int);
    1.15 @@ -92,7 +97,7 @@
    1.16  	GET_SHPTR(g_SHPtr);
    1.17  	g_PLID = 1337;	
    1.18  
    1.19 -	IGaben gabgab;
    1.20 +	Whatever gabgab;
    1.21  	IGaben *pGab = &gabgab;
    1.22  
    1.23  	SourceHook::CallClass<IGaben> *cc = SH_GET_CALLCLASS(pGab);