diff --git a/magyarsort.h b/magyarsort.h index 0967990..c2d538e 100644 --- a/magyarsort.h +++ b/magyarsort.h @@ -317,11 +317,11 @@ namespace MagyarSort { #endif // !NO_MLOCK // "Garbage-collection" - if(GC) { + if constexpr (GC) { arc = std::vector(); // This must be implemented, because we can only access // the static in our function body so this is the "way". - if(GC_WITHOUT_SORT) { + if constexpr (GC_WITHOUT_SORT) { return; } } @@ -358,7 +358,7 @@ namespace MagyarSort { // But instead of the below, we do a trickery... // // Rem.: The branch is optimized out in compile time! - if(REUSE) { + if constexpr (REUSE) { arc.resize(size); } else { // Must not be .clean() !!! @@ -399,7 +399,7 @@ namespace MagyarSort { */ template inline void gc() noexcept { - if(FORCE) { + if constexpr (FORCE) { // Only GC-ing MagyarSort::sort_impl(nullptr, 0); } else {