From 983459ec382a540be51ae191e7d984827e8ec76f Mon Sep 17 00:00:00 2001 From: David Crocker Date: Fri, 23 Dec 2022 18:24:49 +0000 Subject: [PATCH] Added Bitmap::Contains() --- src/General/Bitmap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/General/Bitmap.h b/src/General/Bitmap.h index e5c131e..30ff5df 100644 --- a/src/General/Bitmap.h +++ b/src/General/Bitmap.h @@ -177,6 +177,11 @@ template class Bitmap return (bits & other.bits) == 0; } + constexpr bool Contains(Bitmap other) const noexcept + { + return (~bits & other.bits) == 0; + } + constexpr Bitmap ShiftUp(unsigned int n) const noexcept { return Bitmap(bits << n);