From 20b2574da85a1313f5a7d77a672eb93ed0856b10 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Mon, 14 May 2018 16:20:46 +0200 Subject: [PATCH] Fixed false positive unusedPrivateFunction caused by recent commit --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e50762e15..2150d234c 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -1056,7 +1056,7 @@ void CheckClass::privateFunctions() bool used = checkFunctionUsage(privateFuncs.front(), scope); // Usage in this class // Check in friend classes const std::vector& friendList = scope->definedType->friendList; - for (size_t i = 0; i < friendList.size(); i++) { + for (size_t i = 0; i < friendList.size() && !used; i++) { if (friendList[i].type) used = checkFunctionUsage(privateFuncs.front(), friendList[i].type->classScope); else