Refactoring. Simplified condition using Token::Match.

This commit is contained in:
Daniel Marjamäki 2014-04-29 04:45:45 +02:00
parent 4de9e29adc
commit 36895674ce
1 changed files with 1 additions and 2 deletions

View File

@ -10155,8 +10155,7 @@ void Tokenizer::simplifyOperatorName()
op += par->str();
par = par->next();
// merge namespaces eg. 'operator std :: string () const {'
if (par && par->str() == "::" && par->next() &&
(par->next()->isName() || Token::Match(par->next(), ".|%op%"))) {
if (Token::Match(par, ":: %var%|%op%|.")) {
op += par->str();
par = par->next();
}