summaryrefslogtreecommitdiffstats
path: root/src/CBot/CBotStack.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-11-25 20:03:06 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-11-25 20:03:06 +0100
commitaab79c6b5dc33f2a0f88b42a5308e79aeeb92b2c (patch)
treedca3e7e48129e1270053b678f7dd70b8dae1e6f5 /src/CBot/CBotStack.cpp
parent405db2d70ca108a0422538a4f30072f1831f473b (diff)
downloadcolobot-aab79c6b5dc33f2a0f88b42a5308e79aeeb92b2c.tar.gz
colobot-aab79c6b5dc33f2a0f88b42a5308e79aeeb92b2c.tar.bz2
colobot-aab79c6b5dc33f2a0f88b42a5308e79aeeb92b2c.zip
Changed ASM_TRAP() to assert(0)
Diffstat (limited to 'src/CBot/CBotStack.cpp')
-rw-r--r--src/CBot/CBotStack.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index 086442d..1679e5e 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -18,6 +18,8 @@
#include "CBot.h"
+
+#include <cassert>
#include <cstdlib>
#include <cstring>
@@ -80,12 +82,12 @@ CBotStack* CBotStack::FirstStack()
CBotStack::CBotStack(CBotStack* ppapa)
{
// constructor must exist or the destructor is never called!
- ASM_TRAP();
+ assert(0);
}
CBotStack::~CBotStack()
{
- ASM_TRAP(); // use Delete () instead
+ assert(0); // use Delete () instead
}
void CBotStack::Delete()
@@ -693,7 +695,7 @@ void CBotStack::AddVar(CBotVar* pVar)
*pp = pVar; // added after
#ifdef _DEBUG
- if ( pVar->GetUniqNum() == 0 ) ASM_TRAP();
+ if ( pVar->GetUniqNum() == 0 ) assert(0);
#endif
}
@@ -1091,7 +1093,7 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
}
break;
default:
- ASM_TRAP();
+ assert(0);
}
if ( pPrev != NULL ) pPrev->m_next = pNew;
@@ -1388,7 +1390,7 @@ void CBotCStack::AddVar(CBotVar* pVar)
*pp = pVar; // added after
#ifdef _DEBUG
- if ( pVar->GetUniqNum() == 0 ) ASM_TRAP();
+ if ( pVar->GetUniqNum() == 0 ) assert(0);
#endif
}