Quote:
Originally Posted by ddhoward
PHP Code:
// define NO_DEBUG before including this file to completely disable all debugging #if defined NO_DEBUG stock void InitDebugLog(const char[] convarName, const char[] debugTag, int adminFlag) { } stock bool LogDebug(const char[] format, any ...) { return false; } #endinput #endif
That is already a feature.
|
No... that still compiles it into your plugin, just making it return false all the time and do nothing. NOP NOP NOP
Quote:
Originally Posted by Dr. McKay
Good catch. Fixed. Also added an override with the same name as the cvar.
I don't think that would be possible with LogDebug's variable number of parameters.
|
Code:
#if !defined DEBUG
stock DebugMsg(any:...){}
//#define DebugMsg(%1)
#endinput
#endif
I do it like this, but that still compiles the function with a function call everywhere.
You can just do
#define DebugMsg 0
or something like that, and then it won't compile in your final binary, but you'll see compiler warnings.
__________________