From 224e55780ed44b4ff05bc3b96da4c2a72a666aa1 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 22 Jul 2016 15:35:07 +0300 Subject: [PATCH] Add const where const access is enough --- lib/checknullpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checknullpointer.cpp b/lib/checknullpointer.cpp index d821bac87..873d99185 100644 --- a/lib/checknullpointer.cpp +++ b/lib/checknullpointer.cpp @@ -282,7 +282,7 @@ void CheckNullPointer::nullPointerLinkedList() // Check usage of dereferenced variable in the loop.. for (std::list::const_iterator j = i->nestedList.begin(); j != i->nestedList.end(); ++j) { - Scope* scope = *j; + const Scope* const scope = *j; if (scope->type != Scope::eWhile) continue;