Skip to content

Commit 07cf771

Browse files
committed
Added Bitmap::ClearBits
1 parent a56f31c commit 07cf771

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/General/Bitmap.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ template<class BaseType> class Bitmap
111111
bits &= ~((BaseType)1u << n);
112112
}
113113

114+
// Clear a bit in a bitmap
115+
constexpr void ClearBits(Bitmap<BaseType> other) noexcept
116+
{
117+
bits &= ~other.bits;
118+
}
119+
114120
// Set a bit to a given state
115121
constexpr void SetOrClearBit(unsigned int n, bool b)
116122
{

0 commit comments

Comments
 (0)