diff options
author | David Robillard <d@drobilla.net> | 2022-09-16 19:27:28 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-09-16 22:31:06 -0400 |
commit | 012b0de29906af6402a05a95eed0253a662df78b (patch) | |
tree | c0466f60f7d959f2d1cf3867d5ef364cff1502c1 /include | |
parent | 362681777beb03957d327b229229babead64853b (diff) | |
download | chilbert-012b0de29906af6402a05a95eed0253a662df78b.tar.gz chilbert-012b0de29906af6402a05a95eed0253a662df78b.tar.bz2 chilbert-012b0de29906af6402a05a95eed0253a662df78b.zip |
Avoid "else" after "return"
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(); } |