Skip to content

Commit

Permalink
Merge pull request #1753 from masatake/cxx--use-cxxTokenChainDestroyL…
Browse files Browse the repository at this point in the history
…ast-macro

Cxx,refactor: use cxxTokenChainDestroyLast more
  • Loading branch information
pragmaware authored Jun 3, 2018
2 parents 6f7654b + 1ac9cc3 commit 7e087c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parsers/cxx/cxx_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bool cxxParserParseAndCondenseCurrentSubchain(
);

while(g_cxx.pTokenChain->iCount > 1)
cxxTokenDestroy(cxxTokenChainTakeLast(g_cxx.pTokenChain));
cxxTokenChainDestroyLast(g_cxx.pTokenChain);

// Fake the terminator
CXXToken * pFakeLast = cxxTokenCreate();
Expand Down
6 changes: 3 additions & 3 deletions parsers/cxx/cxx_parser_tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ static bool cxxParserParseNextTokenCondenseAttribute(void)
);

// Kill it
cxxTokenDestroy(cxxTokenChainTakeLast(g_cxx.pTokenChain));
cxxTokenChainDestroyLast(g_cxx.pTokenChain);

// And go ahead.

Expand Down Expand Up @@ -925,7 +925,7 @@ static bool cxxParserParseNextTokenCondenseAttribute(void)
// will report it.

// Kill the token chain
cxxTokenDestroy(cxxTokenChainTakeLast(g_cxx.pTokenChain));
cxxTokenChainDestroyLast(g_cxx.pTokenChain);

return cxxParserParseNextToken();
}
Expand Down Expand Up @@ -977,7 +977,7 @@ static bool cxxParserParseNextTokenCondenseAttribute(void)
}

// Now just kill the chain.
cxxTokenDestroy(cxxTokenChainTakeLast(g_cxx.pTokenChain));
cxxTokenChainDestroyLast(g_cxx.pTokenChain);

// And finally extract yet another token.
CXX_DEBUG_LEAVE();
Expand Down

0 comments on commit 7e087c5

Please sign in to comment.