]> git.seodisparate.com - EntityComponentMetaSystem/commitdiff
Remove "THREADCOUNT" from ThreadPool
authorStephen Seo <seo.disparate@gmail.com>
Tue, 7 Sep 2021 11:15:53 +0000 (20:15 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Tue, 7 Sep 2021 11:15:53 +0000 (20:15 +0900)
Redundant because "SIZE" provides the same value.

src/EC/ThreadPool.hpp

index 3580b5e76f6eb5203ab273416ede9d9d48540614..22da28e4daeebd1de2b1bea219486df16205972e 100644 (file)
@@ -29,8 +29,6 @@ namespace Internal {
 template <unsigned int SIZE>
 class ThreadPool {
 public:
-    using THREADCOUNT = std::integral_constant<int, SIZE>;
-
     ThreadPool() : waitCount(0) {
         isAlive.store(true);
         if(SIZE >= 2) {
@@ -160,7 +158,7 @@ public:
     bool isAllThreadsWaiting() {
         if(SIZE >= 2) {
             std::lock_guard<std::mutex> lock(waitCountMutex);
-            return waitCount == THREADCOUNT::value;
+            return waitCount == SIZE;
         } else {
             return true;
         }