Codechange: convert printf DEBUG statements to fmt Debug statements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user