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

@@ -36,7 +36,7 @@ u32 wapp_cpath_join_path(Str8 *dst, const Str8List *parts) {
// MSVC Spectre mitigation warnings
const Str8Node *node = first_node;
u64 node_index = 1;
b32 running = node_index < parts->node_count;
b8 running = node_index < parts->node_count;
while (running && node->next) {
node = node->next;
if (node->item->size == 0) {
@@ -46,7 +46,7 @@ u32 wapp_cpath_join_path(Str8 *dst, const Str8List *parts) {
if (dst->size > 0) {
char dst_last = wapp_str8_get(dst, dst->size - 1);
char node_start = wapp_str8_get(node->item, 0);
b32 add_path_sep = dst_last != WAPP_PATH_SEP && node_start != WAPP_PATH_SEP;
b8 add_path_sep = dst_last != WAPP_PATH_SEP && node_start != WAPP_PATH_SEP;
if (add_path_sep) {
wapp_str8_concat_capped(dst, &separator);
@@ -68,7 +68,7 @@ Str8 *dirup(const Allocator *allocator, Str8RO *path, u64 levels) {
goto RETURN_DIRUP;
}
b32 absolute = wapp_str8_get(path, 0) == WAPP_PATH_SEP;
b8 absolute = wapp_str8_get(path, 0) == WAPP_PATH_SEP;
Str8 separator = wapp_str8_buf(4);
wapp_str8_push_back(&separator, WAPP_PATH_SEP);

View File

@@ -29,11 +29,11 @@ typedef struct commander_result CMDResult;
struct commander_result {
i32 exit_code;
CMDError error;
b32 exited;
b8 exited;
#ifdef WAPP_PLATFORM_WINDOWS
#include "../../../../common/misc/misc_utils.h"
wapp_misc_utils_padding_size(sizeof(b32) + sizeof(i32) + sizeof(CMDError));
wapp_misc_utils_padding_size(sizeof(b8) + sizeof(i32) + sizeof(CMDError));
#endif // !WAPP_PLATFORM_WINDOWS
};