summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-06-12 09:10:17 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-13 12:45:45 +0200
commit55a11710a6c0f7942f3947711f2050c34782c39d (patch)
tree491b3009324e623236977614e91371a0ea4abac7 /src/game
parenta99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff)
downloadopenttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game_core.cpp4
-rw-r--r--src/game/game_info.cpp2
-rw-r--r--src/game/game_text.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp
index fbe233c9f..19d8bbf54 100644
--- a/src/game/game_core.cpp
+++ b/src/game/game_core.cpp
@@ -169,7 +169,7 @@
* the GameConfig. If not, remove the Game from the list. */
if (_settings_game.game_config != nullptr && _settings_game.game_config->HasScript()) {
if (!_settings_game.game_config->ResetInfo(true)) {
- DEBUG(script, 0, "After a reload, the GameScript by the name '%s' was no longer found, and removed from the list.", _settings_game.game_config->GetName());
+ Debug(script, 0, "After a reload, the GameScript by the name '{}' was no longer found, and removed from the list.", _settings_game.game_config->GetName());
_settings_game.game_config->Change(nullptr);
if (Game::instance != nullptr) {
delete Game::instance;
@@ -182,7 +182,7 @@
}
if (_settings_newgame.game_config != nullptr && _settings_newgame.game_config->HasScript()) {
if (!_settings_newgame.game_config->ResetInfo(false)) {
- DEBUG(script, 0, "After a reload, the GameScript by the name '%s' was no longer found, and removed from the list.", _settings_newgame.game_config->GetName());
+ Debug(script, 0, "After a reload, the GameScript by the name '{}' was no longer found, and removed from the list.", _settings_newgame.game_config->GetName());
_settings_newgame.game_config->Change(nullptr);
}
}
diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp
index deda2e893..3d07a10c4 100644
--- a/src/game/game_info.cpp
+++ b/src/game/game_info.cpp
@@ -75,7 +75,7 @@ template <> const char *GetClassName<GameInfo, ST_GS>() { return "GSInfo"; }
if (!info->CheckMethod("GetAPIVersion")) return SQ_ERROR;
if (!info->engine->CallStringMethodStrdup(*info->SQ_instance, "GetAPIVersion", &info->api_version, MAX_GET_OPS)) return SQ_ERROR;
if (!CheckAPIVersion(info->api_version)) {
- DEBUG(script, 1, "Loading info.nut from (%s.%d): GetAPIVersion returned invalid version", info->GetName(), info->GetVersion());
+ Debug(script, 1, "Loading info.nut from ({}.{}): GetAPIVersion returned invalid version", info->GetName(), info->GetVersion());
return SQ_ERROR;
}
diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp
index ce20c1ee7..74e8d63bd 100644
--- a/src/game/game_text.cpp
+++ b/src/game/game_text.cpp
@@ -32,7 +32,7 @@ void CDECL strgen_warning(const char *s, ...)
va_start(va, s);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
- DEBUG(script, 0, "%s:%d: warning: %s", _file, _cur_line, buf);
+ Debug(script, 0, "{}:{}: warning: {}", _file, _cur_line, buf);
_warnings++;
}
@@ -43,7 +43,7 @@ void CDECL strgen_error(const char *s, ...)
va_start(va, s);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
- DEBUG(script, 0, "%s:%d: error: %s", _file, _cur_line, buf);
+ Debug(script, 0, "{}:{}: error: {}", _file, _cur_line, buf);
_errors++;
}
@@ -54,7 +54,7 @@ void NORETURN CDECL strgen_fatal(const char *s, ...)
va_start(va, s);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
- DEBUG(script, 0, "%s:%d: FATAL: %s", _file, _cur_line, buf);
+ Debug(script, 0, "{}:{}: FATAL: {}", _file, _cur_line, buf);
throw std::exception();
}