Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linc_sdl : SDL.Keycode: Pattern matching havoc #6

Open
delahee opened this issue Mar 14, 2016 · 0 comments
Open

linc_sdl : SDL.Keycode: Pattern matching havoc #6

delahee opened this issue Mar 14, 2016 · 0 comments

Comments

@delahee
Copy link

delahee commented Mar 14, 2016

Hi,

Since switch does no pattern match variables but only constants (static inline), the whole Keycode class is a potential disaster (at least with recent haxe versions).

for example : key_1 is static var and thus the pattern matcher will use every work key_1 as switch traps and all the code in the switch is a potential switch trap.

I suggest obliterating the code (asap) and replacing the old implementation switch with an Int Map matching keycodes and scancodes.

Xoxo

@delahee delahee changed the title linc_sdl : SDL.Keycode linc_sdl : SDL.Keycode: Pattern matching havoc Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant