Repository navigation
Silent subcommands - #529
Conversation
97e3f26 to
b49a575
Compare
Codecov Report
@@ Coverage Diff @@
## master #529 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 3766 3772 +6
=========================================
+ Hits 3766 3772 +6
Continue to review full report at Codecov.
|
b49a575 to
f246a17
Compare
|
|
||
| /// indicator that the subcommand is silent and won't show up in subcommands list | ||
| /// This is potentially useful as a modifier subcommand | ||
| bool silent_{false}; |
There was a problem hiding this comment.
This should be moved up to be with the other 8-bit members; if bools are placed together the compiler is more likely to pack them into 8 bits each, rather than adding alignment spacing. Technically, we probably should try to order the struct members large to small, but optimizing this is not really that important - it's just nice to do it right when we add something.
There was a problem hiding this comment.
I was trying to put it into a gap in alignment, I rearranged a bit
| void _parse_config(const std::vector<ConfigItem> &args) { | ||
| for(const ConfigItem &item : args) { | ||
| void _parse_config(std::vector<ConfigItem> &args) { | ||
| for(ConfigItem item : args) { |
There was a problem hiding this comment.
recommended by clang-tidy or some other static analysis tools I ran
There was a problem hiding this comment.
I am going to change it back, it might have been a merge conflict or something
fe7dfdd to
a43597b
Compare
… in the subcommands list if used. Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
a43597b to
3c0f6fc
Compare
|
I think this is ready now @henryiii |
add a silent option to subcommands to prevent the use from showing up in the subcommands list if used.
This is in response to Issue #522.
Adds an ability to silence subcommands and prevent them from showing up in the used subcommands list.
This allows things like