diff options
author | linus-sherrill <linus-sherrill@users.noreply.github.com> | 2019-06-18 11:16:31 +0300 |
---|---|---|
committer | jarro2783 <jarro.2783@gmail.com> | 2019-06-18 11:16:31 +0300 |
commit | 9910095719931f4a1a3be74d3a5d631851474ff8 (patch) | |
tree | 79040e99a515a2e885ec81bad9829cc7f3f90913 | |
parent | 9064fdf459bfa6745d50231cea2cf75c44c4d01e (diff) |
Remove check for container when generating help message. (#170)
Some positional parameters would be listed in the help text and others
would not, when what is desired is that no positional parameters are
listed with the other command options. This change suppresses the help
listing for all positional parameters.
-rw-r--r-- | include/cxxopts.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 01e01ea..1381ab3 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -1962,8 +1962,7 @@ Options::help_one_group(const std::string& g) const for (const auto& o : group->second.options) { - if (o.is_container && - m_positional_set.find(o.l) != m_positional_set.end() && + if (m_positional_set.find(o.l) != m_positional_set.end() && !m_show_positional) { continue; @@ -1982,8 +1981,7 @@ Options::help_one_group(const std::string& g) const auto fiter = format.begin(); for (const auto& o : group->second.options) { - if (o.is_container && - m_positional_set.find(o.l) != m_positional_set.end() && + if (m_positional_set.find(o.l) != m_positional_set.end() && !m_show_positional) { continue; |