diff --git a/src/common/BitSetIterator.h b/src/common/BitSetIterator.h index 432433a940..1a7fd60696 100644 --- a/src/common/BitSetIterator.h +++ b/src/common/BitSetIterator.h @@ -51,7 +51,7 @@ class BitSetIterator final { private: unsigned long getNextBit(); - static const size_t BitsPerWord = sizeof(uint32_t) * 8; + static constexpr size_t kBitsPerWord = sizeof(uint32_t) * 8; std::bitset mBits; unsigned long mCurrentBit; unsigned long mOffset; @@ -88,7 +88,7 @@ BitSetIterator::Iterator::Iterator(const std::bitset& bits) if (bits.any()) { mCurrentBit = getNextBit(); } else { - mOffset = static_cast(roundUp(N, BitsPerWord)); + mOffset = static_cast(roundUp(N, kBitsPerWord)); } } @@ -120,8 +120,8 @@ unsigned long BitSetIterator::Iterator::getNextBit() { return ScanForward(wordBits) + mOffset; } - mBits >>= BitsPerWord; - mOffset += BitsPerWord; + mBits >>= kBitsPerWord; + mOffset += kBitsPerWord; } return 0; }