Skip to content

Commit

Permalink
command_line/options: Completed implementing automatic options_t help…
Browse files Browse the repository at this point in the history
… for optionSet_t's
  • Loading branch information
dragonmux committed Aug 15, 2023
1 parent fc997ac commit 0d074ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion impl/command_line/options.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ namespace substrate::commandLine
void optionsHolder_t::displayHelp() const noexcept
{
// Figure out how much padding is needed to make everything neat
const auto padding{displayPadding() + 1U};
const auto padding{displayPadding()};
std::vector<optionSet_t> optionSets{};

// Now display the non-alternation options and collect option sets
Expand All @@ -249,6 +249,10 @@ namespace substrate::commandLine
[&](const optionSet_t &value) { optionSets.emplace_back(value); },
}, option);
}

// Now go through each option alternation set and display those
for (const auto &optionSet : optionSets)
optionSet.displayHelp(padding);
}
} // namespace internal
} // namespace substrate::commandLine
Expand Down

0 comments on commit 0d074ec

Please sign in to comment.