Tokenizer: remove the keyword 'inline'

This commit is contained in:
Daniel Marjamäki 2010-01-31 08:11:29 +01:00
parent d17d199415
commit e1efad0c27
2 changed files with 4 additions and 4 deletions

View File

@ -992,14 +992,14 @@ bool Tokenizer::tokenize(std::istream &code, const char FileName[], const std::s
Token::createMutualLinks(tok->tokAt(2), tok->tokAt(3)); Token::createMutualLinks(tok->tokAt(2), tok->tokAt(3));
} }
// Remove "volatile" and "mutable" // Remove "volatile", "mutable" and "inline"
while (_tokens && (_tokens->str() == "volatile" || _tokens->str() == "mutable")) while (Token::Match(_tokens, "volatile|mutable|inline"))
{ {
_tokens->deleteThis(); _tokens->deleteThis();
} }
for (Token *tok = _tokens; tok; tok = tok->next()) for (Token *tok = _tokens; tok; tok = tok->next())
{ {
while (tok->next() && (tok->next()->str() == "volatile" || tok->next()->str() == "mutable")) while (Token::Match(tok->next(), "volatile|mutable|inline"))
{ {
tok->deleteNext(); tok->deleteNext();
} }

View File

@ -2373,7 +2373,7 @@ private:
const char expected[] = const char expected[] =
"namespace VL { " "namespace VL { "
"; " "; "
"inline float fast_atan2 ( float y , float x ) { } " "float fast_atan2 ( float y , float x ) { } "
"}"; "}";
ASSERT_EQUALS(expected, tok(code, false)); ASSERT_EQUALS(expected, tok(code, false));