diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-12 09:10:17 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-06-13 12:45:45 +0200 |
commit | 55a11710a6c0f7942f3947711f2050c34782c39d (patch) | |
tree | 491b3009324e623236977614e91371a0ea4abac7 /src/ai | |
parent | a99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff) | |
download | openttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz |
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_core.cpp | 4 | ||||
-rw-r--r-- | src/ai/ai_info.cpp | 2 | ||||
-rw-r--r-- | src/ai/ai_scanner.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index d48ce05bf..e45738776 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -207,7 +207,7 @@ for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) { if (_settings_game.ai_config[c] != nullptr && _settings_game.ai_config[c]->HasScript()) { if (!_settings_game.ai_config[c]->ResetInfo(true)) { - DEBUG(script, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName()); + Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName()); _settings_game.ai_config[c]->Change(nullptr); if (Company::IsValidAiID(c)) { /* The code belonging to an already running AI was deleted. We can only do @@ -224,7 +224,7 @@ } if (_settings_newgame.ai_config[c] != nullptr && _settings_newgame.ai_config[c]->HasScript()) { if (!_settings_newgame.ai_config[c]->ResetInfo(false)) { - DEBUG(script, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName()); + Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName()); _settings_newgame.ai_config[c]->Change(nullptr); } } diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index 985271fa1..dfb2e5fbf 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -89,7 +89,7 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; } if (info->engine->MethodExists(*info->SQ_instance, "GetAPIVersion")) { 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; } } else { diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 9b3613712..e99b9f8f6 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -66,7 +66,7 @@ AIInfo *AIScannerInfo::SelectRandomAI() const } if (num_random_ais == 0) { - DEBUG(script, 0, "No suitable AI found, loading 'dummy' AI."); + Debug(script, 0, "No suitable AI found, loading 'dummy' AI."); return this->info_dummy; } |