From 41a73e3b1efb1d4f01ac492c534c48aa0a49a9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 10 Jan 2009 12:03:18 +0000 Subject: [PATCH] errmsg: bug fix --- src/errormessage.h | 6 +++--- tools/errmsg.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/errormessage.h b/src/errormessage.h index 1afb03da0..61399079d 100644 --- a/src/errormessage.h +++ b/src/errormessage.h @@ -54,7 +54,7 @@ public: } static bool cstyleCast(const Settings &s) { - return & s._checkCodingStyle; + return s._checkCodingStyle; } static std::string redundantIfDelete0(const Tokenizer *tokenizer, const Token *Location) @@ -63,7 +63,7 @@ public: } static bool redundantIfDelete0(const Settings &s) { - return & s._checkCodingStyle; + return s._checkCodingStyle; } static std::string redundantIfRemove(const Tokenizer *tokenizer, const Token *Location) @@ -72,7 +72,7 @@ public: } static bool redundantIfRemove(const Settings &s) { - return & s._checkCodingStyle; + return s._checkCodingStyle; } static std::string dangerousUsageStrtol(const Tokenizer *tokenizer, const Token *Location) diff --git a/tools/errmsg.cpp b/tools/errmsg.cpp index 06e0c4807..9d39ee153 100644 --- a/tools/errmsg.cpp +++ b/tools/errmsg.cpp @@ -160,12 +160,12 @@ void Message::generateCode(std::ostream &ostr) const ostr << "true"; else { - if (_settings & ALL) + if (_settings == ALL) ostr << "s._showAll"; - if (_settings & (ALL | STYLE)) - ostr << " & "; - if (_settings & STYLE) + else if (_settings == STYLE) ostr << "s._checkCodingStyle"; + else if (_settings == (ALL | STYLE)) + ostr << "s._showAll & s._checkCodingStyle"; } ostr << ";\n"; ostr << " }\n\n";