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
|
||||
#define BITMAP_H
|
||||
|
||||
#include "assert.hpp"
|
||||
|
||||
struct static_bitmap {
|
||||
typedef uint64_t data_type;
|
||||
|
||||
@ -62,8 +64,7 @@ struct static_bitmap {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Use an assert here
|
||||
return 0;
|
||||
thor_unreachable("static_bitmap has not free bit");
|
||||
}
|
||||
|
||||
size_t free_word() const {
|
||||
@ -73,8 +74,7 @@ struct static_bitmap {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Use an assert here
|
||||
return 0;
|
||||
thor_unreachable("static_bitmap has no free word");
|
||||
}
|
||||
|
||||
bool is_set(size_t bit) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user