indent labels
This commit is contained in:
parent
bfe64f7373
commit
354c372e26
@ -799,10 +799,9 @@ struct ase_decode_image_result ase_decode_image(struct arena *arena, struct buff
|
|||||||
/* ASSERT all data was read */
|
/* ASSERT all data was read */
|
||||||
ASSERT(br_bytes_left(&br) == 0);
|
ASSERT(br_bytes_left(&br) == 0);
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -817,10 +817,12 @@ INTERNAL void parse(struct arena *arena, struct parser *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
scratch_end(scratch);
|
|
||||||
p->at = at;
|
p->at = at;
|
||||||
p->root = root;
|
p->root = root;
|
||||||
|
|
||||||
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================== *
|
/* ========================== *
|
||||||
|
|||||||
@ -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_width) { error = STR("Missing \"width\""); goto abort; }
|
||||||
if (!found_height) { error = STR("Missing \"height\""); 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 (error_out && (error.len > 0 || json_error.msg.len > 0)) {
|
||||||
if (json_error.msg.len > 0) {
|
if (json_error.msg.len > 0) {
|
||||||
*error_out = string_format(arena,
|
*error_out = string_format(arena,
|
||||||
|
|||||||
@ -196,7 +196,8 @@ INTERNAL WORK_TASK_FUNC_DEF(sheet_load_asset_task, vparams)
|
|||||||
goto abort;
|
goto abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
logf_error("Error loading sheet \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
logf_error("Error loading sheet \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,8 @@ INTERNAL WORK_TASK_FUNC_DEF(sound_load_asset_task, vparams)
|
|||||||
goto abort;
|
goto abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
logf_error("Error loading sound \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
logf_error("Error loading sound \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
||||||
|
|
||||||
|
|||||||
@ -1861,7 +1861,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
|||||||
if (L.thread_tls_index == TLS_OUT_OF_INDEXES) {
|
if (L.thread_tls_index == TLS_OUT_OF_INDEXES) {
|
||||||
/* TODO: GetLastError */
|
/* TODO: GetLastError */
|
||||||
error_msg = L"Platform initialization error: TLS_OUT_OF_INDEXES";
|
error_msg = L"Platform initialization error: TLS_OUT_OF_INDEXES";
|
||||||
goto error;
|
goto abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize main thread context.
|
/* Initialize main thread context.
|
||||||
@ -1901,7 +1901,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
|||||||
if (!RegisterClassExW(wc)) {
|
if (!RegisterClassExW(wc)) {
|
||||||
/* TODO: GetLastError */
|
/* TODO: GetLastError */
|
||||||
error_msg = L"Failed to register window class";
|
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))) {
|
if (!RegisterRawInputDevices(&rid, 1, sizeof(rid))) {
|
||||||
/* TODO: GetLastError */
|
/* TODO: GetLastError */
|
||||||
error_msg = L"Failed to register raw input device";
|
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 */
|
/* Create app thread & wait for return */
|
||||||
struct sys_thread app_thread = sys_thread_init(&app_thread_entry_point, NULL, STR("[P9] App thread"));
|
struct sys_thread app_thread = sys_thread_init(&app_thread_entry_point, NULL, STR("[P9] App thread"));
|
||||||
sys_thread_join(&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);
|
win32_tls_release(&main_thread_tls);
|
||||||
|
|
||||||
/* Uninitialize COM */
|
/* Uninitialize COM */
|
||||||
|
|||||||
@ -199,7 +199,8 @@ INTERNAL WORK_TASK_FUNC_DEF(texture_load_asset_task, vparams)
|
|||||||
goto abort;
|
goto abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
abort:
|
abort:
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
logf_error("Error loading texture \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
logf_error("Error loading texture \"%F\": %F", FMT_STR(path), FMT_STR(error_msg));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user