From e8b45de6ecfd2ab1672d5a0c2ebc943d460c415d Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 9 May 2018 16:09:19 +0200 Subject: [PATCH] Dropping a few lines --- include/CLI/App.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index c26e2396..c3fd81db 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -328,10 +328,7 @@ class App { T &variable, ///< The variable to set std::string description = "") { - std::string simple_name = CLI::detail::split(name, ',').at(0); - CLI::callback_t fun = [&variable, simple_name](CLI::results_t res) { - return detail::lexical_cast(res[0], variable); - }; + CLI::callback_t fun = [&variable](CLI::results_t res) { return detail::lexical_cast(res[0], variable); }; Option *opt = add_option(name, fun, description, false); opt->set_custom_option(detail::type_name()); @@ -345,10 +342,7 @@ class App { std::string description, bool defaulted) { - std::string simple_name = CLI::detail::split(name, ',').at(0); - CLI::callback_t fun = [&variable, simple_name](CLI::results_t res) { - return detail::lexical_cast(res[0], variable); - }; + CLI::callback_t fun = [&variable](CLI::results_t res) { return detail::lexical_cast(res[0], variable); }; Option *opt = add_option(name, fun, description, defaulted); opt->set_custom_option(detail::type_name());