Fix compiler warning
gcc warning: lib/checkclass.cpp: In member function ‘void CheckClass::checkConst()’: lib/checkclass.cpp:1197: warning: declaration of ‘name’ shadows a member of 'this' Rename local variable 'name' to 's'. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
d6cfbc6483
commit
37b98c2a56
|
@ -1194,8 +1194,8 @@ void CheckClass::checkConst()
|
||||||
if (temp->str() != "const")
|
if (temp->str() != "const")
|
||||||
continue;
|
continue;
|
||||||
} else if (func->isOperator && Token::Match(func->tokenDef->previous(), ";|{|}|public:|private:|protected:")) { // Operator without return type: conversion operator
|
} else if (func->isOperator && Token::Match(func->tokenDef->previous(), ";|{|}|public:|private:|protected:")) { // Operator without return type: conversion operator
|
||||||
const std::string& name = func->token->str();
|
const std::string& opName = func->token->str();
|
||||||
if (name.compare(8, 5, "const") != 0 && name[name.size()-1] == '&')
|
if (opName.compare(8, 5, "const") != 0 && opName[opName.size()-1] == '&')
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// don't warn for unknown types..
|
// don't warn for unknown types..
|
||||||
|
|
Loading…
Reference in New Issue