indent labels

This commit is contained in:
jacob 2024-04-03 23:20:31 -05:00
parent bfe64f7373
commit 354c372e26
7 changed files with 24 additions and 18 deletions

View File

@ -799,10 +799,9 @@ struct ase_decode_image_result ase_decode_image(struct arena *arena, struct buff
/* ASSERT all data was read */
ASSERT(br_bytes_left(&br) == 0);
abort:
abort:
scratch_end(scratch);
return res;
}

View File

@ -817,10 +817,12 @@ INTERNAL void parse(struct arena *arena, struct parser *p)
}
}
abort:
scratch_end(scratch);
abort:
p->at = at;
p->root = root;
scratch_end(scratch);
}
/* ========================== *

View File

@ -137,7 +137,8 @@ struct sys_window_settings *settings_deserialize(struct arena *arena, struct buf
if (!found_width) { error = STR("Missing \"width\""); goto abort; }
if (!found_height) { error = STR("Missing \"height\""); goto abort; }
abort:
abort:
if (error_out && (error.len > 0 || json_error.msg.len > 0)) {
if (json_error.msg.len > 0) {
*error_out = string_format(arena,

View File

@ -196,7 +196,8 @@ INTERNAL WORK_TASK_FUNC_DEF(sheet_load_asset_task, vparams)
goto abort;
}
abort:
abort:
if (!success) {
logf_error("Error loading sheet \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));

View File

@ -147,7 +147,8 @@ INTERNAL WORK_TASK_FUNC_DEF(sound_load_asset_task, vparams)
goto abort;
}
abort:
abort:
if (!success) {
logf_error("Error loading sound \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));

View File

@ -1861,7 +1861,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
if (L.thread_tls_index == TLS_OUT_OF_INDEXES) {
/* TODO: GetLastError */
error_msg = L"Platform initialization error: TLS_OUT_OF_INDEXES";
goto error;
goto abort;
}
/* Initialize main thread context.
@ -1901,7 +1901,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
if (!RegisterClassExW(wc)) {
/* TODO: GetLastError */
error_msg = L"Failed to register window class";
goto error;
goto abort;
}
}
@ -1916,21 +1916,22 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
if (!RegisterRawInputDevices(&rid, 1, sizeof(rid))) {
/* TODO: GetLastError */
error_msg = L"Failed to register raw input device";
goto error;
goto abort;
}
}
error:
if (error_msg) {
MessageBoxExW(NULL, error_msg, L"Fatal initialization error", MB_ICONSTOP, 0);
ASSERT(false);
return 1;
}
/* Create app thread & wait for return */
struct sys_thread app_thread = sys_thread_init(&app_thread_entry_point, NULL, STR("[P9] App thread"));
sys_thread_join(&app_thread);
abort:
if (error_msg) {
MessageBoxExW(NULL, error_msg, L"Fatal initialization error", MB_ICONSTOP, 0);
ASSERT(false);
return 1;
}
win32_tls_release(&main_thread_tls);
/* Uninitialize COM */

View File

@ -199,7 +199,8 @@ INTERNAL WORK_TASK_FUNC_DEF(texture_load_asset_task, vparams)
goto abort;
}
abort:
abort:
if (!success) {
logf_error("Error loading texture \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));