Commit 432fa08d authored by Philipp Götze's avatar Philipp Götze

🚑 Hotfix to help GCC building Bitmap.hpp

parent aa25bf0e
Pipeline #684 passed with stages
in 7 minutes and 31 seconds
......@@ -69,7 +69,6 @@ struct Sanitize<0> {
return (static_cast<Word>(1)) << (bitPos % BITS_PER_WORD);
}
private:
void check(size_t bitpos) const {
if (bitpos >= NUM_BITS)
throw std::out_of_range("pos (which is " + std::to_string(bitpos) +
......@@ -109,19 +108,19 @@ struct Sanitize<0> {
}
Bitref& operator=(const Bitref& other) noexcept {
if ((*(other.wordPtr) & maskbit(other.bitPos)))
*wordPtr |= maskbit(bitPos);
if ((*(other.wordPtr) & Bitmap::maskbit(other.bitPos)))
*wordPtr |= Bitmap::maskbit(bitPos);
else
*wordPtr &= ~maskbit(bitPos);
*wordPtr &= ~Bitmap::maskbit(bitPos);
return *this;
}
bool operator~() const noexcept { return (*(wordPtr)&maskbit(bitPos)) == 0; }
bool operator~() const noexcept { return (*(wordPtr)&Bitmap::maskbit(bitPos)) == 0; }
operator bool() const noexcept { return (*(wordPtr)&maskbit(bitPos)) != 0; }
operator bool() const noexcept { return (*(wordPtr)&Bitmap::maskbit(bitPos)) != 0; }
Bitref& flip() noexcept {
*wordPtr ^= maskbit(bitPos);
*wordPtr ^= Bitmap::maskbit(bitPos);
return *this;
}
}; /// end class Bitref
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment