From 4f986776423f5cd5fd80a16735f873ae23c10da2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 27 Dec 2016 22:01:11 +0000 Subject: [PATCH] Use 'not empty' in place of 'length > 0' --- src/parameters_parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())