From c08433b345d534ec89e8296826bc6c7a6680ec7c Mon Sep 17 00:00:00 2001 From: agra Date: Sun, 31 May 2026 10:46:51 +0300 Subject: [PATCH] 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. --- library/modules/ui/events.sx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/modules/ui/events.sx b/library/modules/ui/events.sx index bef218a..d593a91 100755 --- a/library/modules/ui/events.sx +++ b/library/modules/ui/events.sx @@ -46,7 +46,7 @@ Event :: enum { } event_position :: (e: *Event) -> ?Point { - if e.* == { + if e == { case .mouse_down: (d) { return d.position; } case .mouse_up: (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 :: (sdl: *SDL_Event) -> Event { - if sdl.* == { + if sdl == { case .quit: { return .quit; }