diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/chilbert/detail/MultiBitVec.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/chilbert/detail/MultiBitVec.hpp b/include/chilbert/detail/MultiBitVec.hpp index ca48a94..269fb85 100644 --- a/include/chilbert/detail/MultiBitVec.hpp +++ b/include/chilbert/detail/MultiBitVec.hpp @@ -218,10 +218,12 @@ public: assert(size() == vec.size()); for (size_t ri = 0; ri < num_racks(); ++ri) { - size_t i = num_racks() - ri - 1; + const size_t i = num_racks() - ri - 1; if (rack(i) < vec.rack(i)) { return true; - } else if (rack(i) > vec.rack(i)) { + } + + if (rack(i) > vec.rack(i)) { return false; } } @@ -259,7 +261,9 @@ public: { if (bits == 0) { return *self(); - } else if (bits >= size()) { + } + + if (bits >= size()) { reset(); return *self(); } @@ -294,7 +298,9 @@ public: { if (bits == 0) { return *self(); - } else if (bits >= size()) { + } + + if (bits >= size()) { reset(); return *self(); } |