ui: drop redundant .* on pointer match subjects
event_position and translate_sdl_event matched on e.* / sdl.*; lowerMatch now auto-derefs a pointer subject, so 'if e ==' / 'if sdl ==' are equivalent (same load + tag-switch in IR). Pure cleanup.
This commit is contained in:
@@ -46,7 +46,7 @@ Event :: enum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
event_position :: (e: *Event) -> ?Point {
|
event_position :: (e: *Event) -> ?Point {
|
||||||
if e.* == {
|
if e == {
|
||||||
case .mouse_down: (d) { return d.position; }
|
case .mouse_down: (d) { return d.position; }
|
||||||
case .mouse_up: (d) { return d.position; }
|
case .mouse_up: (d) { return d.position; }
|
||||||
case .mouse_moved: (d) { return d.position; }
|
case .mouse_moved: (d) { return d.position; }
|
||||||
@@ -77,7 +77,7 @@ keycode_from_sdl :: (k: SDL_Keycode) -> Keycode {
|
|||||||
|
|
||||||
// Translate SDL_Event → our Event type
|
// Translate SDL_Event → our Event type
|
||||||
translate_sdl_event :: (sdl: *SDL_Event) -> Event {
|
translate_sdl_event :: (sdl: *SDL_Event) -> Event {
|
||||||
if sdl.* == {
|
if sdl == {
|
||||||
case .quit: {
|
case .quit: {
|
||||||
return .quit;
|
return .quit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user