mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 15:27:56 +03:00
Get rid of some unnecessary temporary buffers
This commit is contained in:
parent
d72d817eac
commit
2c60bd368d
@ -4258,17 +4258,8 @@ bool CBaseEntity::AcceptInput( const char *szInputName, CBaseEntity *pActivator,
|
||||
{
|
||||
// found a match
|
||||
|
||||
char szBuffer[256];
|
||||
// mapper debug message
|
||||
if (pCaller != NULL)
|
||||
{
|
||||
Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) input %s: %s.%s(%s)\n", gpGlobals->curtime, STRING(pCaller->m_iName.Get()), GetDebugName(), szInputName, Value.String() );
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) input <NULL>: %s.%s(%s)\n", gpGlobals->curtime, GetDebugName(), szInputName, Value.String() );
|
||||
}
|
||||
DevMsg( 2, "%s", szBuffer );
|
||||
DevMsg( 2, "(%0.2f) input %s: %s.%s(%s)\n", gpGlobals->curtime, pCaller ? STRING(pCaller->m_iName.Get()) : "<NULL>", GetDebugName(), szInputName, Value.String() );
|
||||
ADD_DEBUG_HISTORY( HISTORY_ENTITY_IO, szBuffer );
|
||||
|
||||
if (m_debugOverlays & OVERLAY_MESSAGE_BIT)
|
||||
|
@ -1103,9 +1103,7 @@ bool g_bCheckForChainedActivate;
|
||||
{ \
|
||||
if ( bCheck ) \
|
||||
{ \
|
||||
char msg[ 1024 ]; \
|
||||
Q_snprintf( msg, sizeof( msg ), "Entity (%i/%s/%s) failed to call base class Activate()\n", pClass->entindex(), pClass->GetClassname(), STRING( pClass->GetEntityName() ) ); \
|
||||
AssertMsg( g_bReceivedChainedActivate == true, msg ); \
|
||||
AssertMsg( g_bReceivedChainedActivate == true, "Entity (%i/%s/%s) failed to call base class Activate()\n", pClass->entindex(), pClass->GetClassname(), STRING( pClass->GetEntityName() ) ); \
|
||||
} \
|
||||
g_bCheckForChainedActivate = false; \
|
||||
}
|
||||
|
@ -57,12 +57,7 @@ void DBG_AssertFunction( bool fExpr, const char *szExpr, const char *szFile, int
|
||||
{
|
||||
if (fExpr)
|
||||
return;
|
||||
char szOut[512];
|
||||
if (szMessage != NULL)
|
||||
Q_snprintf(szOut,sizeof(szOut), "ASSERT FAILED:\n %s \n(%s@%d)\n%s", szExpr, szFile, szLine, szMessage);
|
||||
else
|
||||
Q_snprintf(szOut,sizeof(szOut), "ASSERT FAILED:\n %s \n(%s@%d)\n", szExpr, szFile, szLine);
|
||||
Warning( szOut);
|
||||
Warning("ASSERT FAILED:\n %s \n(%s@%d)\n%s", szExpr, szFile, szLine, szMessage ? szMessage : "");
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user