mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Revert "Let's not crash the client and server on dbg_assert"
This reverts commit a6e144ea72
.
This commit is contained in:
parent
38eba0c83c
commit
deb4917563
|
@ -114,7 +114,7 @@ void dbg_assert_imp(const char *filename, int line, int test, const char *msg)
|
|||
if(!test)
|
||||
{
|
||||
dbg_msg("assert", "%s(%d): %s", filename, line, msg);
|
||||
dbg_break_imp();
|
||||
dbg_break();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,16 +42,12 @@ extern "C" {
|
|||
msg - Message that should be printed if the test fails.
|
||||
|
||||
Remarks:
|
||||
Does nothing in release version
|
||||
Does nothing in release version of the library.
|
||||
|
||||
See Also:
|
||||
<dbg_break>
|
||||
*/
|
||||
#ifdef CONF_DEBUG
|
||||
#define dbg_assert(test, msg) dbg_assert_imp(__FILE__, __LINE__, test, msg)
|
||||
#else
|
||||
#define dbg_assert(test, msg)
|
||||
#endif
|
||||
void dbg_assert_imp(const char *filename, int line, int test, const char *msg);
|
||||
|
||||
#ifdef __clang_analyzer__
|
||||
|
@ -71,17 +67,12 @@ void dbg_assert_imp(const char *filename, int line, int test, const char *msg);
|
|||
Breaks into the debugger.
|
||||
|
||||
Remarks:
|
||||
Does nothing in release version
|
||||
Does nothing in release version of the library.
|
||||
|
||||
See Also:
|
||||
<dbg_assert>
|
||||
*/
|
||||
#ifdef CONF_DEBUG
|
||||
#define dbg_break() dbg_break_imp()
|
||||
#else
|
||||
#define dbg_break()
|
||||
#endif
|
||||
void dbg_break_imp();
|
||||
void dbg_break();
|
||||
|
||||
/*
|
||||
Function: dbg_msg
|
||||
|
@ -93,7 +84,7 @@ void dbg_break_imp();
|
|||
fmt - A printf styled format string.
|
||||
|
||||
Remarks:
|
||||
Also works in release version
|
||||
Does nothing in release version of the library.
|
||||
|
||||
See Also:
|
||||
<dbg_assert>
|
||||
|
|
|
@ -101,7 +101,8 @@ static int GetID(int Index)
|
|||
|
||||
void CUuidManager::RegisterName(int ID, const char *pName)
|
||||
{
|
||||
dbg_assert(GetIndex(ID) == m_aNames.size(), "names must be registered with increasing ID");
|
||||
int Index = GetIndex(ID);
|
||||
dbg_assert(Index == m_aNames.size(), "names must be registered with increasing ID");
|
||||
CName Name;
|
||||
Name.m_pName = pName;
|
||||
Name.m_Uuid = CalculateUuid(pName);
|
||||
|
|
Loading…
Reference in a new issue