Add "if constexpr" where possible in Manager

This commit is contained in:
Stephen Seo 2021-09-07 12:13:28 +09:00
parent 20df53837b
commit 481f223c7d

View file

@ -102,7 +102,7 @@ namespace EC
Manager() Manager()
{ {
resize(EC_INIT_ENTITIES_SIZE); resize(EC_INIT_ENTITIES_SIZE);
if(ThreadCount >= 2) { if constexpr(ThreadCount >= 2) {
threadPool = std::make_unique<ThreadPool<ThreadCount> >(); threadPool = std::make_unique<ThreadPool<ThreadCount> >();
} }
} }