mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives
This commit is contained in:
@@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
void makeCuboid(MeshCollector *collector, const aabb3f &box,
|
||||
TileSpec *tiles, int tilecount, video::SColor &c, const f32* txc)
|
||||
{
|
||||
assert(tilecount >= 1 && tilecount <= 6);
|
||||
assert(tilecount >= 1 && tilecount <= 6); // pre-condition
|
||||
|
||||
v3f min = box.MinEdge;
|
||||
v3f max = box.MaxEdge;
|
||||
@@ -206,8 +206,8 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
||||
|
||||
switch(f.drawtype){
|
||||
default:
|
||||
infostream<<"Got "<<f.drawtype<<std::endl;
|
||||
assert(0);
|
||||
infostream << "Got " << f.drawtype << std::endl;
|
||||
FATAL_ERROR("Unknown drawtype");
|
||||
break;
|
||||
case NDT_AIRLIKE:
|
||||
break;
|
||||
@@ -754,7 +754,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
||||
break;}
|
||||
case NDT_GLASSLIKE_FRAMED_OPTIONAL:
|
||||
// This is always pre-converted to something else
|
||||
assert(0);
|
||||
FATAL_ERROR("NDT_GLASSLIKE_FRAMED_OPTIONAL not pre-converted as expected");
|
||||
break;
|
||||
case NDT_GLASSLIKE_FRAMED:
|
||||
{
|
||||
@@ -1006,7 +1006,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
||||
break;}
|
||||
case NDT_ALLFACES_OPTIONAL:
|
||||
// This is always pre-converted to something else
|
||||
assert(0);
|
||||
FATAL_ERROR("NDT_ALLFACES_OPTIONAL not pre-converted");
|
||||
break;
|
||||
case NDT_TORCHLIKE:
|
||||
{
|
||||
|
Reference in New Issue
Block a user