johnnovak / illwill

A curses inspired simple cross-platform console library for Nim
Do What The F*ck You Want To Public License
398 stars 27 forks source link

use cast to disable warnings instead of unsafe Key()[HoleEnumConv] #50

Closed bloomingchad closed 4 months ago

bloomingchad commented 4 months ago

the whole point is that Key(c) cast causes Holey Enum compiler warnings, this hopefully removes it by just simply using cast[]()

did you think about this? or did you miss it? Please close it if its bs

Commit: ay, looked at the generated source before commit, its generates the same as above code. we don't get warnings anymore.

johnnovak commented 4 months ago

I think this will blow up with unknown keycodes, so I'd rather keep what we have @bloomingchad.

bloomingchad commented 4 months ago

Hey yes, an unknown number do cause illegal storage access SIGSEGV. Have a good day