Use or_else in the core library when it makes sense

This commit is contained in:
gingerBill
2021-07-05 16:33:01 +01:00
parent 3b9ca8535f
commit 9b3a0251ca
5 changed files with 6 additions and 29 deletions
+1 -6
View File
@@ -68,12 +68,7 @@ Thread_Os_Specific :: struct {
thread_create :: proc(procedure: Thread_Proc) -> ^Thread {
__windows_thread_entry_proc :: proc "stdcall" (t_: rawptr) -> win32.DWORD {
t := (^Thread)(t_);
context = runtime.default_context();
c := context;
if ic, ok := t.init_context.?; ok {
c = ic;
}
context = c;
context = or_else(t.init_context.?, runtime.default_context());
t.procedure(t);