Skip to content

linc_sdl : SDL.Keycode: Pattern matching havoc #6

@delahee

Description

@delahee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions