From 79e9bf188b6827d5d8b4e79b69e2875f74aa066f Mon Sep 17 00:00:00 2001 From: Oleksandr Labetskyi Date: Wed, 4 Nov 2026 15:17:04 +0000 Subject: [PATCH] Add constParameterReference to checkConstVariable --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 5f98d376a91..c8de5c4fd3d 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1766,7 +1766,7 @@ static bool isCastToVoid(const Variable* var) void CheckOtherImpl::checkConstVariable() { - if ((!mSettings.severity.isEnabled(Severity::style) || mTokenizer->isC()) && !mSettings.isPremiumEnabled("constVariable")) + if ((!mSettings.severity.isEnabled(Severity::style) || mTokenizer->isC()) && !mSettings.isPremiumEnabled("constVariable") && !mSettings.isPremiumEnabled("constParameterReference")) return; logChecker("CheckOther::checkConstVariable"); // style,c++