From a94628d8fc5f3df15f44ec0589a944ec3a8b6e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 21 Aug 2016 15:57:19 +0200 Subject: [PATCH] Settings: Make Settings::_terminated static. All threads and subchecks are terminated --- lib/settings.cpp | 5 +++-- lib/settings.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/settings.cpp b/lib/settings.cpp index a0a7454eb..41ecc3dc9 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -23,9 +23,10 @@ #include #include +bool Settings::_terminated; + Settings::Settings() - : _terminated(false), - debug(false), + : debug(false), debugnormal(false), debugwarnings(false), dump(false), diff --git a/lib/settings.h b/lib/settings.h index 8b2f1e5be..ccef10a45 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -51,7 +51,7 @@ private: std::set _enabled; /** @brief terminate checking */ - bool _terminated; + static bool _terminated; public: Settings(); @@ -98,12 +98,12 @@ public: /** @brief Request termination of checking */ void terminate() { - _terminated = true; + Settings::_terminated = true; } /** @brief termination requested? */ bool terminated() const { - return _terminated; + return Settings::_terminated; } /** @brief Force checking the files with "too many" configurations (--force). */