From a8f45846a723fb3d691ddb5540fa99bff99e6b3f Mon Sep 17 00:00:00 2001 From: ssande7 <1731652+ssande7@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:30:55 +1000 Subject: [PATCH] Respect thermo_modify warn always --- src/error.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/error.cpp b/src/error.cpp index bf0f56d7a6..b351c64ad1 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -122,7 +122,8 @@ void Error::universe_one(const std::string &file, int line, const std::string &s void Error::universe_warn(const std::string &file, int line, const std::string &str) { ++numwarn; - if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; + if (maxwarn < 0) return; + if (maxwarn != 0 && ((numwarn > maxwarn) || (allwarn > maxwarn))) return; if (universe->uscreen) fmt::print(universe->uscreen,"WARNING on proc {}: {} ({}:{})\n", universe->me,str,truncpath(file),line); @@ -254,7 +255,8 @@ void Error::_one(const std::string &file, int line, fmt::string_view format, void Error::warning(const std::string &file, int line, const std::string &str) { ++numwarn; - if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; + if (maxwarn < 0) return; + if (maxwarn != 0 && ((numwarn > maxwarn) || (allwarn > maxwarn))) return; std::string mesg = fmt::format("WARNING: {} ({}:{})\n", str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen);