Refactor lib/checkio.cpp
This commit is contained in:
parent
17bd2f0c72
commit
c367fc9f09
|
@ -1593,8 +1593,7 @@ bool CheckIO::ArgumentInfo::isStdVectorOrString()
|
|||
} else if (variableInfo->type()) {
|
||||
const Scope * classScope = variableInfo->type()->classScope;
|
||||
if (classScope) {
|
||||
std::list<Function>::const_iterator functions;
|
||||
for (functions = classScope->functionList.begin();
|
||||
for (std::list<Function>::const_iterator functions = classScope->functionList.begin();
|
||||
functions != classScope->functionList.end(); ++functions) {
|
||||
if (functions->name() == "operator[]") {
|
||||
if (Token::Match(functions->retDef, "%type% &")) {
|
||||
|
@ -1697,7 +1696,7 @@ void CheckIO::wrongPrintfScanfArgumentsError(const Token* tok,
|
|||
unsigned int numFormat,
|
||||
unsigned int numFunction)
|
||||
{
|
||||
Severity::SeverityType severity = numFormat > numFunction ? Severity::error : Severity::warning;
|
||||
const Severity::SeverityType severity = numFormat > numFunction ? Severity::error : Severity::warning;
|
||||
if (severity != Severity::error && !_settings->isEnabled(Settings::WARNING))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue