From 315ab418d254b7a3f1c6119742b724eaafdc2c00 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sun, 2 Oct 2022 16:20:27 -0400 Subject: [PATCH] fix warning only enable the clock counter errors in debug --- common/log.cc | 4 +++- include/common/log.hh | 2 ++ tests/test_qbsp.hh | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/log.cc b/common/log.cc index 95a2e715..a3fc10d1 100644 --- a/common/log.cc +++ b/common/log.cc @@ -191,12 +191,14 @@ void percent_clock::print() } ready = false; - + +#ifdef _DEBUG if (max != indeterminate) { if (count != max) { logging::print("ERROR TO FIX LATER: clock counter ended too early\n"); } } +#endif percent(max, max, displayElapsed); } diff --git a/include/common/log.hh b/include/common/log.hh index de644f7e..31a2e7f1 100644 --- a/include/common/log.hh +++ b/include/common/log.hh @@ -149,9 +149,11 @@ struct percent_clock // increase count by 1 inline void increase() { +#ifdef _DEBUG if (count == max) { logging::print("ERROR TO FIX LATER: clock counter increased to end, but not finished yet\n"); } +#endif percent(count++, max, displayElapsed); } diff --git a/tests/test_qbsp.hh b/tests/test_qbsp.hh index 7e140c27..24aca4b0 100644 --- a/tests/test_qbsp.hh +++ b/tests/test_qbsp.hh @@ -6,7 +6,6 @@ class mapbrush_t; struct mapface_t; -class mapface_t; class mapentity_t; const mapface_t *Mapbrush_FirstFaceWithTextureName(const mapbrush_t &brush, const std::string &texname);