summaryrefslogtreecommitdiff
path: root/src/script/script_scanner.cpp
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/script/script_scanner.cpp
parenta99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff)
downloadopenttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/script/script_scanner.cpp')
-rw-r--r--src/script/script_scanner.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp
index bdde99f6c..dc14da1db 100644
--- a/src/script/script_scanner.cpp
+++ b/src/script/script_scanner.cpp
@@ -38,7 +38,7 @@ bool ScriptScanner::AddFile(const std::string &filename, size_t basepath_length,
try {
this->engine->LoadScript(filename.c_str());
} catch (Script_FatalError &e) {
- DEBUG(script, 0, "Fatal error '%s' when trying to load the script '%s'.", e.GetErrorMessage().c_str(), filename.c_str());
+ Debug(script, 0, "Fatal error '{}' when trying to load the script '{}'.", e.GetErrorMessage(), filename);
return false;
}
return true;
@@ -106,7 +106,7 @@ void ScriptScanner::RegisterScript(ScriptInfo *info)
/* Check if GetShortName follows the rules */
if (strlen(info->GetShortName()) != 4) {
- DEBUG(script, 0, "The script '%s' returned a string from GetShortName() which is not four characaters. Unable to load the script.", info->GetName());
+ Debug(script, 0, "The script '{}' returned a string from GetShortName() which is not four characaters. Unable to load the script.", info->GetName());
delete info;
return;
}
@@ -123,10 +123,10 @@ void ScriptScanner::RegisterScript(ScriptInfo *info)
return;
}
- DEBUG(script, 1, "Registering two scripts with the same name and version");
- DEBUG(script, 1, " 1: %s", this->info_list[script_name]->GetMainScript());
- DEBUG(script, 1, " 2: %s", info->GetMainScript());
- DEBUG(script, 1, "The first is taking precedence.");
+ Debug(script, 1, "Registering two scripts with the same name and version");
+ Debug(script, 1, " 1: {}", this->info_list[script_name]->GetMainScript());
+ Debug(script, 1, " 2: {}", info->GetMainScript());
+ Debug(script, 1, "The first is taking precedence.");
delete info;
return;