From 0261a8cd1526359dc9f0beba8cbf1dc3eb524f6a Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Fri, 1 Jan 2021 13:34:34 +0100 Subject: [PATCH] Codechange: move some DEBUG-levels and remove some others in saveload routine When running with -dsl=2 it is very easy to miss important information as there was a lot of noise in between too. This tunes the debug levels a bit to be less noisy while keeping the important bits. --- src/saveload/saveload.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 91f9c5a080a3..1b79ad926b4e 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -305,17 +305,13 @@ static void SlNullPointers() * pointers from other pools. */ _sl_version = SAVEGAME_VERSION; - DEBUG(sl, 1, "Nulling pointers"); - FOR_ALL_CHUNK_HANDLERS(ch) { if (ch->ptrs_proc != nullptr) { - DEBUG(sl, 2, "Nulling pointers for %c%c%c%c", ch->id >> 24, ch->id >> 16, ch->id >> 8, ch->id); + DEBUG(sl, 3, "Nulling pointers for %c%c%c%c", ch->id >> 24, ch->id >> 16, ch->id >> 8, ch->id); ch->ptrs_proc(); } } - DEBUG(sl, 1, "All pointers nulled"); - assert(_sl.action == SLA_NULL); } @@ -1847,17 +1843,13 @@ static void SlFixPointers() { _sl.action = SLA_PTRS; - DEBUG(sl, 1, "Fixing pointers"); - FOR_ALL_CHUNK_HANDLERS(ch) { if (ch->ptrs_proc != nullptr) { - DEBUG(sl, 2, "Fixing pointers for %c%c%c%c", ch->id >> 24, ch->id >> 16, ch->id >> 8, ch->id); + DEBUG(sl, 3, "Fixing pointers for %c%c%c%c", ch->id >> 24, ch->id >> 16, ch->id >> 8, ch->id); ch->ptrs_proc(); } } - DEBUG(sl, 1, "All pointers fixed"); - assert(_sl.action == SLA_PTRS); }