Get rid of some unnecessary temporary buffers

This commit is contained in:
Alexander 'z33ky' Hirsch
2020-02-26 16:04:20 +01:00
parent d72d817eac
commit 2c60bd368d
3 changed files with 3 additions and 19 deletions

View File

@@ -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