1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bitmap post-review fixes

This commit is contained in:
serg@serg.mylan
2003-10-30 19:17:57 +01:00
parent eb93b6b81a
commit 9c4049ad12
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); }