Skip to content

Commit

Permalink
debug: use light assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed May 8, 2024
1 parent 108e6da commit 36a266e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kaminpar-common/datastructures/compact_hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <type_traits>
#include <utility>

#include "kaminpar-common/assert.h"
#include "kaminpar-common/math.h"

namespace kaminpar {
Expand Down Expand Up @@ -63,7 +64,8 @@ template <typename Type> class CompactHashMap {
cur_pos = hash(cur_pos + 1);
KASSERT(
cur_pos != start_pos || ((full_detector++) == 0),
"hash table full: invariant violated, might loop endlessly ..."
"hash table full: invariant violated, might loop endlessly ...",
assert::light
);

cur_entry = read_pos(cur_pos);
Expand Down Expand Up @@ -142,7 +144,8 @@ template <typename Type> class CompactHashMap {
pos = hash(pos + 1);
KASSERT(
pos != key || ((full_detector++) == 0),
"hash table full and key not found: invariant violated, might loop endlessly ..."
"hash table full and key not found: invariant violated, might loop endlessly ...",
assert::light
);

entry = read_pos(pos);
Expand Down

0 comments on commit 36a266e

Please sign in to comment.