mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 14:18:47 +00:00
Use or_else in the core library when it makes sense
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user