added if constexpr(..) where it could be
This commit is contained in:
parent
d858f39708
commit
ff05bc2688
@ -317,11 +317,11 @@ namespace MagyarSort {
|
||||
#endif // !NO_MLOCK
|
||||
|
||||
// "Garbage-collection"
|
||||
if(GC) {
|
||||
if constexpr (GC) {
|
||||
arc = std::vector<uint32_t>();
|
||||
// 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<bool FORCE = false, typename COUNTER_TYP = size_t>
|
||||
inline void gc() noexcept {
|
||||
if(FORCE) {
|
||||
if constexpr (FORCE) {
|
||||
// Only GC-ing
|
||||
MagyarSort::sort_impl<COUNTER_TYP, true, true, true>(nullptr, 0);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user