Skip to content

Commit 8ce15da

Browse files
authored
Merge pull request #129 from kkarbowiak/sonar-cleanup
Clean up code
2 parents 12ee057 + 073c9fc commit 8ce15da

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

include/argparse.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,6 @@ namespace argparse
316316
}
317317

318318
ArgumentParser()
319-
: m_arguments()
320-
, m_prog()
321-
, m_usage()
322-
, m_description()
323-
, m_epilog()
324-
, m_version()
325-
, m_handle(Handle::errors_help_version)
326319
{
327320
add_argument("-h", "--help").action(help).help("show this help message and exit");
328321
}
@@ -1165,12 +1158,11 @@ namespace argparse
11651158
}
11661159

11671160
private:
1168-
bool m_present;
1161+
bool m_present = false;
11691162

11701163
public:
11711164
explicit OptionalArgument(Options options)
11721165
: Argument(std::move(options))
1173-
, m_present(false)
11741166
{
11751167
}
11761168

@@ -1664,6 +1656,6 @@ namespace argparse
16641656
optstring m_description;
16651657
optstring m_epilog;
16661658
optstring m_version;
1667-
Handle m_handle;
1659+
Handle m_handle = Handle::errors_help_version;
16681660
};
16691661
}

0 commit comments

Comments
 (0)