util/Bitmap: add more utility methods

Change-Id: I021c2fafa01266e8a38c1cb2fd748fd89a4b75bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6742
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2023-07-24 21:00:56 +00:00
committed by waddlesplash
parent ddde98b06d
commit 0235c04759
2 changed files with 67 additions and 1 deletions
+6 -1
View File
@@ -22,7 +22,7 @@ namespace BKernel {
class Bitmap {
public:
Bitmap(size_t bitCount);
Bitmap(size_t bitCount = 0);
~Bitmap();
status_t InitCheck();
@@ -34,6 +34,11 @@ public:
inline void Set(size_t index);
inline void Clear(size_t index);
void SetRange(size_t index, size_t count);
void ClearRange(size_t index, size_t count);
ssize_t GetLowestClear(size_t fromIndex = 0) const;
ssize_t GetLowestContiguousClear(size_t count, size_t fromIndex = 0) const;
ssize_t GetHighestSet() const;
private: