From aaa5e790b6b5b4c9de0b1ca3346ed0c2e55e4e03 Mon Sep 17 00:00:00 2001 From: Jarryd Beck Date: Mon, 15 Feb 2021 08:33:56 +1100 Subject: [PATCH] Rename variable, add to example --- include/cxxopts.hpp | 4 ++-- 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(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(), "N") ("float", "A floating point number", cxxopts::value()) ("vector", "A list of doubles", cxxopts::value>())