1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bitmap post-review fixes

This commit is contained in:
unknown
2003-10-30 19:17:57 +01:00
parent a8b7edda51
commit 372e949242
10 changed files with 88 additions and 66 deletions

View File

@ -16,6 +16,7 @@ template <uint default_width> class Bitmap
uchar buffer[(default_width+7)/8];
public:
Bitmap() { init(); }
Bitmap(Bitmap& from) { *this=from; }
Bitmap(uint prefix_to_set) { init(prefix_to_set); }
void init() { bitmap_init(&map, buffer, default_width, 0); }
void init(uint prefix_to_set) { init(); set_prefix(prefix_to_set); }
@ -24,6 +25,7 @@ public:
{
init();
memcpy(buffer, map2.buffer, sizeof(buffer));
return *this;
}
void set_bit(uint n) { bitmap_set_bit(&map, n); }
void clear_bit(uint n) { bitmap_clear_bit(&map, n); }