mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Make certain procedures "contextless" for microui
This commit is contained in:
Vendored
+3
-3
@@ -622,7 +622,7 @@ push_command :: proc(ctx: ^Context, $Type: typeid, extra_size := 0) -> ^Type {
|
|||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
next_command :: proc(ctx: ^Context, pcmd: ^^Command) -> bool {
|
next_command :: proc "contextless" (ctx: ^Context, pcmd: ^^Command) -> bool {
|
||||||
cmd := pcmd^
|
cmd := pcmd^
|
||||||
defer pcmd^ = cmd
|
defer pcmd^ = cmd
|
||||||
if cmd != nil {
|
if cmd != nil {
|
||||||
@@ -630,7 +630,7 @@ next_command :: proc(ctx: ^Context, pcmd: ^^Command) -> bool {
|
|||||||
} else {
|
} else {
|
||||||
cmd = (^Command)(&ctx.command_list.items[0])
|
cmd = (^Command)(&ctx.command_list.items[0])
|
||||||
}
|
}
|
||||||
invalid_command :: #force_inline proc(ctx: ^Context) -> ^Command {
|
invalid_command :: #force_inline proc "contextless" (ctx: ^Context) -> ^Command {
|
||||||
return (^Command)(&ctx.command_list.items[ctx.command_list.idx])
|
return (^Command)(&ctx.command_list.items[ctx.command_list.idx])
|
||||||
}
|
}
|
||||||
for cmd != invalid_command(ctx) {
|
for cmd != invalid_command(ctx) {
|
||||||
@@ -643,7 +643,7 @@ next_command :: proc(ctx: ^Context, pcmd: ^^Command) -> bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
next_command_iterator :: proc(ctx: ^Context, pcm: ^^Command) -> (Command_Variant, bool) {
|
next_command_iterator :: proc "contextless" (ctx: ^Context, pcm: ^^Command) -> (Command_Variant, bool) {
|
||||||
if next_command(ctx, pcm) {
|
if next_command(ctx, pcm) {
|
||||||
return pcm^.variant, true
|
return pcm^.variant, true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user