delete: Deleted helper utility funcitons

This commit is contained in:
2026-04-11 21:17:38 -06:00
parent 15b5cc382f
commit 54522fece5
2 changed files with 0 additions and 28 deletions

View File

@@ -200,26 +200,4 @@ void *arena_unwrap_pointer(ArenaPointer p) {
return p.arena->buffer + p.offset;
}
static inline bool is_power_of_two(size_t x) {
return x != 0 && (x & (x - 1)) == 0;
}
static inline bool add_size_t_safe(size_t a, size_t b, size_t *out) {
if (a > SIZE_MAX - b) return true;
*out = a + b;
return false;
}
static inline bool mul_size_t_safe(size_t a, size_t b, size_t *out) {
if (out == NULL) {
return true;
}
if (a != 0 && b > SIZE_MAX / a) {
return true;
}
*out = a * b;
return false;
}