mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-06-03 05:31:20 -04:00
Collapse main.cpp's hand-written ladder of 28 individual "if --foo and i+N >= argc, print message, return 1" blocks into a single loop over kMultiArgRequired (struct of flag, needed count, synopsis). main.cpp drops from 246 → 126 lines. Adding a new multi-arg flag now means appending one row to cli_multi_arg_required.cpp instead of pasting another six lines into the validation ladder. Mirrors the kArgRequired pattern that handles single-arg flags.
4.3 KiB
4.3 KiB