errmsg: bug fix

This commit is contained in:
Daniel Marjamäki 2009-01-10 12:03:18 +00:00
parent 985b8fa05f
commit 41a73e3b1e
2 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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";