Use empty() instead of size() == 0

This commit is contained in:
Alex Beregszaszi
2018-10-09 04:29:37 +01:00
parent 4ab2e03be3
commit fa0ce6a7e7
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ assembly::Statement Parser::parseStatement()
fatalParserError("Only one default case allowed.");
else if (m_scanner->currentToken() == Token::Case)
fatalParserError("Case not allowed after default case.");
if (_switch.cases.size() == 0)
if (_switch.cases.empty())
fatalParserError("Switch statement without any cases.");
_switch.location.end = _switch.cases.back().body.location.end;
return _switch;