Change boolean size to 1 byte

This commit is contained in:
2025-12-07 12:17:40 +00:00
parent 432e4a48d5
commit 9c5b95c229
41 changed files with 489 additions and 364 deletions

View File

@@ -9,7 +9,7 @@ wapp_intern i32 count = 20;
wapp_intern i32 *array = nullptr;
TestFuncResult test_arena_init(void) {
b32 result = wapp_mem_arena_init(&arena, ARENA_CAPACITY);
b8 result = wapp_mem_arena_init(&arena, ARENA_CAPACITY);
return wapp_tester_result(result);
}
@@ -17,7 +17,7 @@ TestFuncResult test_arena_init(void) {
TestFuncResult test_arena_init_succeeds_when_reserving_very_large_size(void) {
Arena *large_arena = nullptr;
u64 capacity = GB(512);
b32 result = wapp_mem_arena_init(&large_arena, capacity);
b8 result = wapp_mem_arena_init(&large_arena, capacity);
if (result) {
wapp_mem_arena_destroy(&large_arena);
}
@@ -27,7 +27,7 @@ TestFuncResult test_arena_init_succeeds_when_reserving_very_large_size(void) {
TestFuncResult test_arena_alloc_succeeds_when_within_capacity(void) {
array = (i32 *)wapp_mem_arena_alloc(arena, count * sizeof(i32));
b32 result = array != nullptr;
b8 result = array != nullptr;
for (i32 i = 0; i < count; ++i) {
array[i] = i * 10;
@@ -38,7 +38,7 @@ TestFuncResult test_arena_alloc_succeeds_when_within_capacity(void) {
TestFuncResult test_arena_alloc_fails_when_over_capacity(void) {
u8 *bytes = (u8 *)wapp_mem_arena_alloc(arena, ARENA_CAPACITY * 2);
b32 result = bytes == nullptr;
b8 result = bytes == nullptr;
return wapp_tester_result(result);
}
@@ -91,7 +91,7 @@ TestFuncResult test_arena_realloc_smaller_size(void) {
TestFuncResult test_arena_clear(void) {
wapp_mem_arena_clear(arena);
b32 result = true;
b8 result = true;
for (i32 i = 0; i < count; ++i) {
if (array[i] != 0) {
@@ -105,7 +105,7 @@ TestFuncResult test_arena_clear(void) {
TestFuncResult test_arena_destroy(void) {
wapp_mem_arena_destroy(&arena);
b32 result = arena == nullptr;
b8 result = arena == nullptr;
return wapp_tester_result(result);
}