From ba58f14196d8e0444616429383779231e4fd4d2c Mon Sep 17 00:00:00 2001 From: chrchr-github Date: Wed, 26 Jul 2023 11:08:02 +0200 Subject: [PATCH] const --- lib/checkother.cpp | 2 +- lib/checkother.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 15a8d89ec6a..2999e546043 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -991,7 +991,7 @@ void CheckOther::checkVariableScope() } } -bool CheckOther::checkInnerScope(const Token *tok, const Variable* var, bool& used) +bool CheckOther::checkInnerScope(const Token *tok, const Variable* var, bool& used) const { const Scope* scope = tok->next()->scope(); bool loopVariable = scope->isLoopScope(); diff --git a/lib/checkother.h b/lib/checkother.h index efae5459d2d..747f1e63857 100644 --- a/lib/checkother.h +++ b/lib/checkother.h @@ -123,7 +123,7 @@ class CPPCHECKLIB CheckOther : public Check { /** @brief %Check scope of variables */ void checkVariableScope(); - bool checkInnerScope(const Token *tok, const Variable* var, bool& used); + bool checkInnerScope(const Token *tok, const Variable* var, bool& used) const; /** @brief %Check for comma separated statements in return */ void checkCommaSeparatedReturn();