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));
}
// Remove "volatile" and "mutable"
while (_tokens && (_tokens->str() == "volatile" || _tokens->str() == "mutable"))
// Remove "volatile", "mutable" and "inline"
while (Token::Match(_tokens, "volatile|mutable|inline"))
{
_tokens->deleteThis();
}
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();
}

View File

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