diff options
author | Jarryd Beck <jarro.2783@gmail.com> | 2021-02-15 00:33:56 +0300 |
---|---|---|
committer | Jarryd Beck <jarro.2783@gmail.com> | 2021-02-15 00:33:56 +0300 |
commit | 265f593a4b4984d22292bbb8b776f752b1a05a6b (patch) | |
tree | 434bb4abb091aa6ce48b180e7d0b69fc3106c38e | |
parent | cf630defb121bd448e93f3e9cf030695ea294d95 (diff) |
Rename variable, add to exampledescription-fix
-rw-r--r-- | include/cxxopts.hpp | 4 | ||||
-rw-r--r-- | src/example.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index b1efb4c..eee7ba0 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -1636,7 +1636,7 @@ namespace cxxopts const HelpOptionDetails& o, size_t start, size_t allowed, - bool m_tab_expansion + bool tab_expansion ) { auto desc = o.desc; @@ -1655,7 +1655,7 @@ namespace cxxopts String result; - if (m_tab_expansion) + if (tab_expansion) { String desc2; auto size = size_t{ 0 }; diff --git a/src/example.cpp b/src/example.cpp index 0efb3a4..c21bad6 100644 --- a/src/example.cpp +++ b/src/example.cpp @@ -39,6 +39,8 @@ parse(int argc, const char* argv[]) bool apple = false; options + .set_width(70) + .set_tab_expansion() .allow_unrecognised_options() .add_options() ("a,apple", "an apple", cxxopts::value<bool>(apple)) @@ -56,6 +58,7 @@ parse(int argc, const char* argv[]) ("long-description", "thisisareallylongwordthattakesupthewholelineandcannotbebrokenataspace") ("help", "Print help") + ("tab-expansion", "Tab\texpansion") ("int", "An integer", cxxopts::value<int>(), "N") ("float", "A floating point number", cxxopts::value<float>()) ("vector", "A list of doubles", cxxopts::value<std::vector<double>>()) |