From cc8b0c0a7061a0b674077d58c28cd1ba4d3eafc1 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 10 Oct 2023 22:42:27 +0200 Subject: turn ArgOpts into an aggregate --- src/argparser.cc | 2 +- src/include/argparser.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/argparser.cc b/src/argparser.cc index 621bc5c..59cdced 100644 --- a/src/argparser.cc +++ b/src/argparser.cc @@ -237,7 +237,7 @@ void CommandLineArgs::registerArg(const string &arg, name = name.substr(2); } - reg.insert(make_pair(name, ArgOpts(shorts, boolean, optional, desc))); + reg.insert(make_pair(name, ArgOpts{shorts, boolean, optional, desc})); } bool CommandLineArgs::hasArg(const string &arg) const diff --git a/src/include/argparser.h b/src/include/argparser.h index 7aedf17..8cbced0 100644 --- a/src/include/argparser.h +++ b/src/include/argparser.h @@ -19,13 +19,6 @@ namespace Binc { bool b; bool o; std::string desc; - - ArgOpts(const std::string &chr, bool boolean, bool optional, const std::string &descr) - : c(chr) - , b(boolean) - , o(optional) - , desc(descr) - {} }; class CommandLineArgs { -- cgit v1.2.3