Use 'not empty' in place of 'length > 0'

This commit is contained in:
Maxime Coste 2016-12-27 22:01:11 +00:00
parent 84c2ca1cdc
commit 4f98677642

View File

@ -23,7 +23,7 @@ ParametersParser::ParametersParser(ParameterList params,
{ {
if (not only_pos and params[i] == "--") if (not only_pos and params[i] == "--")
only_pos = true; 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)); auto it = m_desc.switches.find(params[i].substr(1_byte));
if (it == m_desc.switches.end()) if (it == m_desc.switches.end())