Skip to content

Commit 0eb3c2e

Browse files
authored
Remove unused m_is_default from struct argument. Fixed argument action not being called when a default is defined (#3)
1 parent 8c2afd3 commit 0eb3c2e

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

source/timemory/utility/argparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ argument_parser::parse(const std::vector<std::string>& _args, int verbose_level)
985985
// execute the argument-specific actions
986986
for(auto& itr : m_arg_map)
987987
{
988-
if(exists(itr.first) || itr.second->m_is_default)
988+
if(exists(itr.first) || itr.second->m_default)
989989
itr.second->execute_actions(*this);
990990
}
991991

source/timemory/utility/argparse.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,6 @@ struct argument_parser
718718
bool is_separator() const;
719719

720720
friend struct argument_parser;
721-
bool m_is_default = false;
722721
int m_position = Position::IgnoreArgument;
723722
int m_count = Count::ANY;
724723
int m_min_count = Count::ANY;

0 commit comments

Comments
 (0)