mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-14 06:56:51 -04:00
Add assertions
This commit is contained in:
parent
cc12fddafc
commit
6af9f457a5
@ -8,6 +8,8 @@
|
|||||||
#ifndef BITMAP_H
|
#ifndef BITMAP_H
|
||||||
#define BITMAP_H
|
#define BITMAP_H
|
||||||
|
|
||||||
|
#include "assert.hpp"
|
||||||
|
|
||||||
struct static_bitmap {
|
struct static_bitmap {
|
||||||
typedef uint64_t data_type;
|
typedef uint64_t data_type;
|
||||||
|
|
||||||
@ -62,8 +64,7 @@ struct static_bitmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO Use an assert here
|
thor_unreachable("static_bitmap has not free bit");
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t free_word() const {
|
size_t free_word() const {
|
||||||
@ -73,8 +74,7 @@ struct static_bitmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO Use an assert here
|
thor_unreachable("static_bitmap has no free word");
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_set(size_t bit) const {
|
bool is_set(size_t bit) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user