summaryrefslogtreecommitdiff
path: root/src/main.cpp
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/main.cpp
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/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a01ddec93..d84a09f76 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
if (!game_configure(&game_params, cmd_args))
return 1;
- assert(game_params.world_path != "");
+ sanity_check(game_params.world_path != "");
infostream << "Using commanded world path ["
<< game_params.world_path << "]" << std::endl;
@@ -549,7 +549,7 @@ static void startup_message()
static bool read_config_file(const Settings &cmd_args)
{
// Path of configuration file in use
- assert(g_settings_path == ""); // Sanity check
+ sanity_check(g_settings_path == ""); // Sanity check
if (cmd_args.exists("config")) {
bool r = g_settings->readConfigFile(cmd_args.get("config").c_str());
@@ -748,7 +748,7 @@ static bool auto_select_world(GameParams *game_params)
<< world_path << "]" << std::endl;
}
- assert(world_path != "");
+ assert(world_path != ""); // Post-condition
game_params->world_path = world_path;
return true;
}
@@ -804,7 +804,7 @@ static bool determine_subgame(GameParams *game_params)
{
SubgameSpec gamespec;
- assert(game_params->world_path != ""); // pre-condition
+ assert(game_params->world_path != ""); // Pre-condition
verbosestream << _("Determining gameid/gamespec") << std::endl;
// If world doesn't exist