From 61e61c15848a3b850d7992bf739ef5b6eca6c45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 28 Dec 2009 18:06:26 +0100 Subject: [PATCH] Robert Reif: Fixed #1158 ((possible style) message with regular check) --- lib/checkstl.h | 7 ++++++- test/teststl.cpp | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/checkstl.h b/lib/checkstl.h index 26c3b79a2..1fa468b43 100644 --- a/lib/checkstl.h +++ b/lib/checkstl.h @@ -54,7 +54,12 @@ public: checkStl.pushback(); checkStl.stlBoundries(); checkStl.find(); - checkStl.size(); + + if (settings->_checkCodingStyle) + { + if (settings->_showAll) + checkStl.size(); + } } diff --git a/test/teststl.cpp b/test/teststl.cpp index c106de737..0190ac452 100644 --- a/test/teststl.cpp +++ b/test/teststl.cpp @@ -89,8 +89,11 @@ private: errout.str(""); // Check.. + Settings settings; + settings._checkCodingStyle = true; + settings._showAll = true; CheckStl checkStl; - checkStl.runSimplifiedChecks(&tokenizer, (const Settings *)0, this); + checkStl.runSimplifiedChecks(&tokenizer, &settings, this); }