diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | include/chilbert/detail/MultiBitVec.hpp | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy index d97cfa6..e096e94 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,7 +1,6 @@ Checks: > *, -*-avoid-c-arrays, - -*-else-after-return, -*-magic-numbers, -*-member-init, -*-move-const-arg, 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(); } |