Skip to content

Commit

Permalink
Added Bitmap::Contains()
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Dec 23, 2022
1 parent a78e0cf commit 983459e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/General/Bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ template<class BaseType> class Bitmap
return (bits & other.bits) == 0;
}

constexpr bool Contains(Bitmap<BaseType> other) const noexcept
{
return (~bits & other.bits) == 0;
}

constexpr Bitmap<BaseType> ShiftUp(unsigned int n) const noexcept
{
return Bitmap<BaseType>(bits << n);
Expand Down

0 comments on commit 983459e

Please sign in to comment.