Refactoring: Getting rid of %var1%
This commit is contained in:
parent
66e03b8a92
commit
36e54b739b
|
@ -718,9 +718,9 @@ void CheckClass::virtualDestructor()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Find the destructor declaration for the base class.
|
// Find the destructor declaration for the base class.
|
||||||
const Token *base = Token::findmatch(_tokenizer->tokens(), "%any% ~ %var1% (", baseName);
|
const Token *base = Token::findmatch(_tokenizer->tokens(), (std::string( "%any% ~ " )+baseName[0]+" (" ).c_str());
|
||||||
while (Token::Match(base, "::"))
|
while (Token::Match(base, "::"))
|
||||||
base = Token::findmatch(base->next(), "%any% ~ %var1% (", baseName);
|
base = Token::findmatch(base->next(), (std::string( "%any% ~ " ) + baseName[0] + +" (").c_str());
|
||||||
|
|
||||||
while (Token::Match(base, "%var%") && !Token::Match(base, "virtual"))
|
while (Token::Match(base, "%var%") && !Token::Match(base, "virtual"))
|
||||||
base = base->previous();
|
base = base->previous();
|
||||||
|
@ -729,7 +729,7 @@ void CheckClass::virtualDestructor()
|
||||||
if ( ! base )
|
if ( ! base )
|
||||||
{
|
{
|
||||||
// Is the class declaration available?
|
// Is the class declaration available?
|
||||||
base = Token::findmatch(_tokenizer->tokens(), "class %var1% :|{", baseName);
|
base = Token::findmatch(_tokenizer->tokens(), (std::string( "class ")+baseName[0]+" :|{").c_str());
|
||||||
if ( base )
|
if ( base )
|
||||||
{
|
{
|
||||||
std::ostringstream errmsg;
|
std::ostringstream errmsg;
|
||||||
|
|
Loading…
Reference in New Issue