Skip to content

Commit fc7dca0

Browse files
authored
optimized std::stack usage in simplecpp::TokenList::combineOperators() (#659)
1 parent 163fc92 commit fc7dca0

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
@@ -1017,8 +1017,7 @@ static bool isAlternativeAndBitandBitor(const simplecpp::Token* tok)
10171017

10181018
void simplecpp::TokenList::combineOperators()
10191019
{
1020-
std::stack<bool> executableScope;
1021-
executableScope.push(false);
1020+
std::stack<bool, std::vector<bool>> executableScope{{false}};
10221021
for (Token *tok = front(); tok; tok = tok->next) {
10231022
if (tok->op == '{') {
10241023
if (executableScope.top()) {

0 commit comments

Comments
 (0)