diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/game.cpp b/src/game.cpp index 48d43c9f7..a700da8cd 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1386,8 +1386,6 @@ protected: void showOverlayMessage(const char *msg, float dtime, int percent, bool draw_clouds = true); - inline const char *boolToCStr(bool v); - private: InputHandler *input; @@ -2472,7 +2470,7 @@ void MinetestApp::toggleFreeMove(float *statustext_time) static const wchar_t *msg[] = { L"free_move disabled", L"free_move enabled" }; bool free_move = !g_settings->getBool("free_move"); - g_settings->set("free_move", boolToCStr(free_move)); + g_settings->set("free_move", bool_to_cstr(free_move)); *statustext_time = 0; statustext = msg[free_move]; @@ -2494,7 +2492,7 @@ void MinetestApp::toggleFast(float *statustext_time) { static const wchar_t *msg[] = { L"fast_move disabled", L"fast_move enabled" }; bool fast_move = !g_settings->getBool("fast_move"); - g_settings->set("fast_move", boolToCStr(fast_move)); + g_settings->set("fast_move", bool_to_cstr(fast_move)); *statustext_time = 0; statustext = msg[fast_move]; @@ -2508,7 +2506,7 @@ void MinetestApp::toggleNoClip(float *statustext_time) { static const wchar_t *msg[] = { L"noclip disabled", L"noclip enabled" }; bool noclip = !g_settings->getBool("noclip"); - g_settings->set("noclip", boolToCStr(noclip)); + g_settings->set("noclip", bool_to_cstr(noclip)); *statustext_time = 0; statustext = msg[noclip]; @@ -3937,13 +3935,6 @@ void MinetestApp::showOverlayMessage(const char *msg, float dtime, } -inline const char *MinetestApp::boolToCStr(bool v) -{ - static const char *str[] = { "false", "true" }; - return str[v]; -} - - /**************************************************************************** Shutdown / cleanup |