Skip to content

Commit a80a3ea

Browse files
committed
initialize std::stack with intial value instead of inserting it in simplecpp::TokenList::combineOperators()
1 parent 3ef1187 commit a80a3ea

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

simplecpp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,8 +1031,7 @@ static bool isAlternativeAndBitandBitor(const simplecpp::Token* tok)
10311031

10321032
void simplecpp::TokenList::combineOperators()
10331033
{
1034-
std::stack<bool, std::vector<bool>> executableScope;
1035-
executableScope.push(false);
1034+
std::stack<bool, std::vector<bool>> executableScope{{false}};
10361035
for (Token *tok = front(); tok; tok = tok->next) {
10371036
if (tok->op == '{') {
10381037
if (executableScope.top()) {

0 commit comments

Comments
 (0)