summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parameters_parser.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parameters_parser.cc b/src/parameters_parser.cc
index 697f1407..68a497c9 100644
--- a/src/parameters_parser.cc
+++ b/src/parameters_parser.cc
@@ -23,7 +23,7 @@ ParametersParser::ParametersParser(ParameterList params,
{
if (not only_pos and params[i] == "--")
only_pos = true;
- else if (not only_pos and params[i].length() > 0 and params[i][0_byte] == '-')
+ else if (not only_pos and not params[i].empty() and params[i][0_byte] == '-')
{
auto it = m_desc.switches.find(params[i].substr(1_byte));
if (it == m_desc.switches.end())