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/saveload/oldloader.cpp | |
parent | a99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff) | |
download | openttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz |
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/saveload/oldloader.cpp')
-rw-r--r-- | src/saveload/oldloader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index 74a1466da..a6f2d55ce 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -56,7 +56,7 @@ static byte ReadByteFromFile(LoadgameState *ls) /* We tried to read, but there is nothing in the file anymore.. */ if (count == 0) { - DEBUG(oldloader, 0, "Read past end of file, loading failed"); + Debug(oldloader, 0, "Read past end of file, loading failed"); throw std::exception(); } @@ -132,7 +132,7 @@ bool LoadChunk(LoadgameState *ls, void *base, const OldChunks *chunks) break; case OC_ASSERT: - DEBUG(oldloader, 4, "Assert point: 0x%X / 0x%X", ls->total_read, (uint)(size_t)chunk->ptr + _bump_assert_value); + Debug(oldloader, 4, "Assert point: 0x{:X} / 0x{:X}", ls->total_read, (uint)(size_t)chunk->ptr + _bump_assert_value); if (ls->total_read != (size_t)chunk->ptr + _bump_assert_value) throw std::exception(); default: break; } @@ -273,7 +273,7 @@ bool LoadOldSaveGame(const std::string &file) { LoadgameState ls; - DEBUG(oldloader, 3, "Trying to load a TTD(Patch) savegame"); + Debug(oldloader, 3, "Trying to load a TTD(Patch) savegame"); InitLoading(&ls); @@ -281,7 +281,7 @@ bool LoadOldSaveGame(const std::string &file) ls.file = FioFOpenFile(file, "rb", NO_DIRECTORY); if (ls.file == nullptr) { - DEBUG(oldloader, 0, "Cannot open file '%s'", file.c_str()); + Debug(oldloader, 0, "Cannot open file '{}'", file); return false; } |