From 56d7ddd3ba44f5d3dd1ba668f6c0455c0a724b60 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 9 Sep 2021 15:55:23 +0900 Subject: [PATCH] Use "if constexpr" where possible in ThreadPool --- src/EC/ThreadPool.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EC/ThreadPool.hpp b/src/EC/ThreadPool.hpp index 8a47cb1..d00a4dc 100644 --- a/src/EC/ThreadPool.hpp +++ b/src/EC/ThreadPool.hpp @@ -172,7 +172,7 @@ public: queued functions have been executed by the threads in the thread pool. */ void easyWakeAndWait() { - if(SIZE >= 2) { + if constexpr(SIZE >= 2) { wakeThreads(); do { std::this_thread::sleep_for(std::chrono::microseconds(150));