Use 'not empty' in place of 'length > 0'
This commit is contained in:
parent
84c2ca1cdc
commit
4f98677642
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user