BitMap: Change the size param to the number of entries (bits)
This commit is contained in:
@@ -20,13 +20,13 @@ class BitMap {
|
||||
public:
|
||||
BitMap();
|
||||
|
||||
// Size is the number of 8-bit entries, must be a multiple of 4.
|
||||
BitMap(size_t size);
|
||||
// Size is the number of entries, must be a multiple of 32.
|
||||
BitMap(size_t size_bits);
|
||||
|
||||
// Data does not have to be aligned to a 4-byte boundary, but it is
|
||||
// preferable.
|
||||
// Size is the number of 8-bit entries, must be a multiple of 4.
|
||||
BitMap(uint32_t* data, size_t size);
|
||||
// Size is the number of entries, must be a multiple of 32.
|
||||
BitMap(uint32_t* data, size_t size_bits);
|
||||
|
||||
// (threadsafe) Acquires an entry and returns its index. Returns -1 if there
|
||||
// are no more free entries.
|
||||
@@ -35,9 +35,8 @@ class BitMap {
|
||||
// (threadsafe) Releases an entry by an index.
|
||||
void Release(size_t index);
|
||||
|
||||
// Resize the bitmap. Size is the number of 8-bit entries, must be a multiple
|
||||
// of 4.
|
||||
void Resize(size_t new_size);
|
||||
// Resize the bitmap. Size is the number of entries, must be a multiple of 32.
|
||||
void Resize(size_t new_size_bits);
|
||||
|
||||
// Sets all entries to free.
|
||||
void Reset();
|
||||
|
||||
Reference in New Issue
Block a user