]> git.corax.cc Git - toolbox/commit
include/opt: Use associative array to track missing options
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:09:07 +0000 (02:09 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:09:07 +0000 (02:09 +0900)
commit613b5b606bf8b35b064f66bd40f0ebe7079621ac
tree6902685751ad130eabf8f904e3ba0b551462d6e9
parentc5e2758931d222fb20b552fb2a0d71fe83e8bbc9
include/opt: Use associative array to track missing options

The opt module does not track missing options, but instead checks
on demand if required options are missing by inspecting all options'
flags and value. This approach is needlessly complicated and slow.

This commit changes the opt module to track required options using
an associative array, allowing the check for missing options to be
performed in constant time.
include/opt.sh