aboutsummaryrefslogtreecommitdiffstats
path: root/include/chilbert/detail/BitVecMask.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-09-16 16:27:19 -0400
committerDavid Robillard <d@drobilla.net>2022-09-16 22:31:06 -0400
commit8697e134aeac0318e6686d785113f0763cbc3c1c (patch)
tree86897017d682939a1faf586b5bb61a15f814387a /include/chilbert/detail/BitVecMask.hpp
parent49dab5622b31421eb6af84eae376d73fae1cd4a0 (diff)
downloadchilbert-8697e134aeac0318e6686d785113f0763cbc3c1c.tar.gz
chilbert-8697e134aeac0318e6686d785113f0763cbc3c1c.tar.bz2
chilbert-8697e134aeac0318e6686d785113f0763cbc3c1c.zip
Fix signed bitwise operator operands
Diffstat (limited to 'include/chilbert/detail/BitVecMask.hpp')
-rw-r--r--include/chilbert/detail/BitVecMask.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/chilbert/detail/BitVecMask.hpp b/include/chilbert/detail/BitVecMask.hpp
index 03eaf5f..2d3466a 100644
--- a/include/chilbert/detail/BitVecMask.hpp
+++ b/include/chilbert/detail/BitVecMask.hpp
@@ -43,16 +43,16 @@ struct BitVecMask
void operator++()
{
- if ((mask <<= 1) == 0) {
- mask = 1;
+ if ((mask <<= 1U) == 0U) {
+ mask = 1U;
++rack;
}
}
void operator--()
{
- if ((mask >>= 1) == 0) {
- mask = Rack{1} << (bits_per_rack - 1);
+ if ((mask >>= 1U) == 0U) {
+ mask = Rack{1} << (bits_per_rack - 1U);
--rack;
}
}