diff options
author | Craig Robbins <kde.psych@gmail.com> | 2015-03-06 20:21:51 +1000 |
---|---|---|
committer | Craig Robbins <kde.psych@gmail.com> | 2015-03-07 22:41:47 +1000 |
commit | ced6d20295a8263757d57c02a07ffcb66688a163 (patch) | |
tree | a44527357c1ffccb88bf479686735aef168d15c1 /src/staticobject.h | |
parent | a603a767877b94b4d3bc4d3de8d762fbc56a583d (diff) | |
download | minetest-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.h | 5 |
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 |