summaryrefslogtreecommitdiff
path: root/src/staticobject.h
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-03-06 20:21:51 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-03-07 22:41:47 +1000
commitced6d20295a8263757d57c02a07ffcb66688a163 (patch)
treea44527357c1ffccb88bf479686735aef168d15c1 /src/staticobject.h
parenta603a767877b94b4d3bc4d3de8d762fbc56a583d (diff)
downloadminetest-ced6d20295a8263757d57c02a07ffcb66688a163.tar.gz
minetest-ced6d20295a8263757d57c02a07ffcb66688a163.tar.bz2
minetest-ced6d20295a8263757d57c02a07ffcb66688a163.zip
For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives
Diffstat (limited to 'src/staticobject.h')
-rw-r--r--src/staticobject.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/staticobject.h b/src/staticobject.h
index 4918a1466..95a1b945e 100644
--- a/src/staticobject.h
+++ b/src/staticobject.h
@@ -68,8 +68,7 @@ public:
{
dstream<<"ERROR: StaticObjectList::insert(): "
<<"id already exists"<<std::endl;
- assert(0);
- return;
+ FATAL_ERROR("StaticObjectList::insert()");
}
m_active[id] = obj;
}
@@ -77,7 +76,7 @@ public:
void remove(u16 id)
{
- assert(id != 0);
+ assert(id != 0); // Pre-condition
if(m_active.find(id) == m_active.end())
{
dstream<<"WARNING: StaticObjectList::remove(): id="<<id