Repository navigation
Give options a designated initializer to make crossreferencing their usage easier - #905
Conversation
|
Shall I add a CI step for MSVC then? Then I could move to the other approach with confidence |
|
Can't be that many people on MSVC because it appears to have been broken for the last 17 months :P CI is so very slow, PR coming assuming it succeeds. |
998d891 to
14042cf
Compare
|
So, this now works but I was considering yet another useless refactor: ditch the enum, turn the thing into a packed struct, and expose that for people who want to iterate it as a That would require a larger change, that being changing the overlay code to accept string_view instead of just const char*, but I think it's doable since imgui itself uses start/end of a string and does not need the NUL terminator. |
|
Changed my mind; the options parsing also creates a vector where order is important and indexed via the enum. This is fine for now. |
Description of change
This always bothered me, you have a commandline arg and it's a massive pain in the ass to work out where it's used because the flag never really matches the enum name.
Array designated initializers are a C99 extension that clang+gcc both support. I suspect msvc still blows up, but are people still using that? I can change it to a std::invoke lambda instead.
Chose to drop the (unused?) option sorting func because, well, unused.
Testing
Builds in CI, didn't do much more intense testing.