From 3ec821df3419ecd6cef5cca083a5cbfc51adefe9 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 6 Aug 2014 15:35:04 +0400 Subject: [PATCH] Avoid GCC name shadowing warning. --- lib/checkclass.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 92bc65172..a1929f955 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -853,26 +853,26 @@ void CheckClass::privateFunctions() if (Token::findsimplematch(scope->classStart, "; __property ;", scope->classEnd)) continue; - std::list privateFunctions; + std::list privateFuncs; for (std::list::const_iterator func = scope->functionList.begin(); func != scope->functionList.end(); ++func) { // Get private functions.. if (func->type == Function::eFunction && func->access == Private && !func->isOperator) // TODO: There are smarter ways to check private operator usage - privateFunctions.push_back(&*func); + privateFuncs.push_back(&*func); } // Bailout for overridden virtual functions of base classes if (!scope->definedType->derivedFrom.empty()) { // Check virtual functions - for (std::list::iterator it = privateFunctions.begin(); it != privateFunctions.end();) { + for (std::list::iterator it = privateFuncs.begin(); it != privateFuncs.end();) { if ((*it)->isImplicitlyVirtual(true)) // Give true as default value to be returned if we don't see all base classes - privateFunctions.erase(it++); + privateFuncs.erase(it++); else ++it; } } - while (!privateFunctions.empty()) { - const std::string& funcName = privateFunctions.front()->tokenDef->str(); + while (!privateFuncs.empty()) { + const std::string& funcName = privateFuncs.front()->tokenDef->str(); // Check that all private functions are used bool used = checkFunctionUsage(funcName, &*scope); // Usage in this class // Check in friend classes @@ -885,9 +885,9 @@ void CheckClass::privateFunctions() } if (!used) - unusedPrivateFunctionError(privateFunctions.front()->tokenDef, scope->className, funcName); + unusedPrivateFunctionError(privateFuncs.front()->tokenDef, scope->className, funcName); - privateFunctions.pop_front(); + privateFuncs.pop_front(); } } }