mirror of
https://github.com/ValveSoftware/GameNetworkingSockets.git
synced 2026-05-29 16:20:34 +00:00
Change type of spew level to int from enum.
This is so that I can pass an int configuration value to it without casting.
This commit is contained in:
@@ -1719,7 +1719,7 @@ SteamNetworkingMicroseconds g_usecLastRateLimitSpew;
|
||||
ESteamNetworkingSocketsDebugOutputType g_eDefaultGroupSpewLevel;
|
||||
static FSteamNetworkingSocketsDebugOutput s_pfnDebugOutput = nullptr;
|
||||
|
||||
void VReallySpewType( ESteamNetworkingSocketsDebugOutputType eType, const char *pMsg, va_list ap )
|
||||
void VReallySpewType( int eType, const char *pMsg, va_list ap )
|
||||
{
|
||||
// Save callback. Paranoia for unlikely but possible race condition,
|
||||
// if we spew from more than one place in our code and stuff changes
|
||||
@@ -1738,10 +1738,10 @@ void VReallySpewType( ESteamNetworkingSocketsDebugOutputType eType, const char *
|
||||
V_StripTrailingWhitespaceASCII( buf );
|
||||
|
||||
// Invoke callback
|
||||
pfnDebugOutput( eType, buf );
|
||||
pfnDebugOutput( ESteamNetworkingSocketsDebugOutputType(eType), buf );
|
||||
}
|
||||
|
||||
void ReallySpewType( ESteamNetworkingSocketsDebugOutputType eType, const char *pMsg, ... )
|
||||
void ReallySpewType( int eType, const char *pMsg, ... )
|
||||
{
|
||||
va_list ap;
|
||||
va_start( ap, pMsg );
|
||||
|
||||
@@ -265,10 +265,10 @@ inline bool BRateLimitSpew( SteamNetworkingMicroseconds usecNow )
|
||||
}
|
||||
|
||||
extern ESteamNetworkingSocketsDebugOutputType g_eDefaultGroupSpewLevel;
|
||||
extern void ReallySpewType( ESteamNetworkingSocketsDebugOutputType eType, PRINTF_FORMAT_STRING const char *pMsg, ... ) FMTFUNCTION( 2, 3 );
|
||||
extern void VReallySpewType( ESteamNetworkingSocketsDebugOutputType eType, const char *pMsg, va_list ap );
|
||||
extern void ReallySpewType( int eType, PRINTF_FORMAT_STRING const char *pMsg, ... ) FMTFUNCTION( 2, 3 );
|
||||
extern void VReallySpewType( int eType, const char *pMsg, va_list ap );
|
||||
|
||||
#define SpewTypeGroup( eType, nGroup, ... ) ( ( (eType) <= (nGroup) ) ? ReallySpewType( ESteamNetworkingSocketsDebugOutputType(eType), __VA_ARGS__ ) : (void)0 )
|
||||
#define SpewTypeGroup( eType, nGroup, ... ) ( ( (eType) <= (nGroup) ) ? ReallySpewType( (eType), __VA_ARGS__ ) : (void)0 )
|
||||
#define SpewMsgGroup( nGroup, ... ) SpewTypeGroup( k_ESteamNetworkingSocketsDebugOutputType_Msg, (nGroup), __VA_ARGS__ )
|
||||
#define SpewVerboseGroup( nGroup, ... ) SpewTypeGroup( k_ESteamNetworkingSocketsDebugOutputType_Verbose, (nGroup), __VA_ARGS__ )
|
||||
#define SpewDebugGroup( nGroup, ... ) SpewTypeGroup( k_ESteamNetworkingSocketsDebugOutputType_Debug, (nGroup), __VA_ARGS__ )
|
||||
|
||||
Reference in New Issue
Block a user