Bonus question:
#ifdef _DEBUG
#define SetThink( a ) ThinkSet( static_cast <void (CBaseEntity::*)(void)>
(a), #a )
#else

What's the difference for this debug version?

Specifically, the debug version expands to this:
ThinkSet ((CBaseEntity::*)(FnName), "FnName")

Hmm, ok, maybe I didn't expand perfectly the C++ bits, but the
'stringize' preprocessor operator gives you the function name as a
quoted string literal. ThinkSet having a declaration similar to:
xxxx ThinkSet( void *, const char * );

xxxx is the immaterial in this case return type ;)

The quoted literal is used to report a lack of EXPORT declaration in
debug mode (if it fails to find the EXPORT declaration). (it's passed to
the FunctionCheck function (say that ten times fast :P)) in debug builds
only.


------------------------------

Pat 'sluggo' Magnan
Tour of Duty mod
http://www.tourofdutymod.com

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to