@@ -54,10 +54,10 @@ static bool isNonBoolStdType(const Variable* var)
5454// ---------------------------------------------------------------------------
5555void CheckBool::checkIncrementBoolean ()
5656{
57- if (!_settings ->isEnabled (Settings::STYLE))
57+ if (!mSettings ->isEnabled (Settings::STYLE))
5858 return ;
5959
60- const SymbolDatabase *symbolDatabase = _tokenizer ->getSymbolDatabase ();
60+ const SymbolDatabase *symbolDatabase = mTokenizer ->getSymbolDatabase ();
6161 for (const Scope * scope : symbolDatabase->functionScopes ) {
6262 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
6363 if (Token::Match (tok, " %var% ++" )) {
@@ -87,15 +87,15 @@ void CheckBool::incrementBooleanError(const Token *tok)
8787// ---------------------------------------------------------------------------
8888void CheckBool::checkBitwiseOnBoolean ()
8989{
90- if (!_settings ->isEnabled (Settings::STYLE))
90+ if (!mSettings ->isEnabled (Settings::STYLE))
9191 return ;
9292
9393 // danmar: this is inconclusive because I don't like that there are
9494 // warnings for calculations. Example: set_flag(a & b);
95- if (!_settings ->inconclusive )
95+ if (!mSettings ->inconclusive )
9696 return ;
9797
98- const SymbolDatabase *symbolDatabase = _tokenizer ->getSymbolDatabase ();
98+ const SymbolDatabase *symbolDatabase = mTokenizer ->getSymbolDatabase ();
9999 for (const Scope * scope : symbolDatabase->functionScopes ) {
100100 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
101101 if (Token::Match (tok, " (|.|return|&&|%oror%|throw|, %var% [&|]" )) {
@@ -129,10 +129,10 @@ void CheckBool::bitwiseOnBooleanError(const Token *tok, const std::string &varna
129129
130130void CheckBool::checkComparisonOfBoolWithInt ()
131131{
132- if (!_settings ->isEnabled (Settings::WARNING) || !_tokenizer ->isCPP ())
132+ if (!mSettings ->isEnabled (Settings::WARNING) || !mTokenizer ->isCPP ())
133133 return ;
134134
135- const SymbolDatabase* const symbolDatabase = _tokenizer ->getSymbolDatabase ();
135+ const SymbolDatabase* const symbolDatabase = mTokenizer ->getSymbolDatabase ();
136136 for (const Scope * scope : symbolDatabase->functionScopes ) {
137137 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
138138 const Token* const left = tok->astOperand1 ();
@@ -178,13 +178,13 @@ static bool tokenIsFunctionReturningBool(const Token* tok)
178178
179179void CheckBool::checkComparisonOfFuncReturningBool ()
180180{
181- if (!_settings ->isEnabled (Settings::STYLE))
181+ if (!mSettings ->isEnabled (Settings::STYLE))
182182 return ;
183183
184- if (!_tokenizer ->isCPP ())
184+ if (!mTokenizer ->isCPP ())
185185 return ;
186186
187- const SymbolDatabase * const symbolDatabase = _tokenizer ->getSymbolDatabase ();
187+ const SymbolDatabase * const symbolDatabase = mTokenizer ->getSymbolDatabase ();
188188
189189 for (const Scope * scope : symbolDatabase->functionScopes ) {
190190 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
@@ -237,16 +237,16 @@ void CheckBool::checkComparisonOfBoolWithBool()
237237{
238238 // FIXME: This checking is "experimental" because of the false positives
239239 // when self checking lib/tokenize.cpp (#2617)
240- if (!_settings ->experimental )
240+ if (!mSettings ->experimental )
241241 return ;
242242
243- if (!_settings ->isEnabled (Settings::STYLE))
243+ if (!mSettings ->isEnabled (Settings::STYLE))
244244 return ;
245245
246- if (!_tokenizer ->isCPP ())
246+ if (!mTokenizer ->isCPP ())
247247 return ;
248248
249- const SymbolDatabase* const symbolDatabase = _tokenizer ->getSymbolDatabase ();
249+ const SymbolDatabase* const symbolDatabase = mTokenizer ->getSymbolDatabase ();
250250
251251 for (const Scope * scope : symbolDatabase->functionScopes ) {
252252 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
@@ -289,7 +289,7 @@ void CheckBool::comparisonOfBoolWithBoolError(const Token *tok, const std::strin
289289// -----------------------------------------------------------------------------
290290void CheckBool::checkAssignBoolToPointer ()
291291{
292- const SymbolDatabase *symbolDatabase = _tokenizer ->getSymbolDatabase ();
292+ const SymbolDatabase *symbolDatabase = mTokenizer ->getSymbolDatabase ();
293293 for (const Scope * scope : symbolDatabase->functionScopes ) {
294294 for (const Token* tok = scope->bodyStart ; tok != scope->bodyEnd ; tok = tok->next ()) {
295295 if (tok->str () == " =" && astIsBool (tok->astOperand2 ())) {
@@ -315,10 +315,10 @@ void CheckBool::assignBoolToPointerError(const Token *tok)
315315// -----------------------------------------------------------------------------
316316void CheckBool::checkComparisonOfBoolExpressionWithInt ()
317317{
318- if (!_settings ->isEnabled (Settings::WARNING))
318+ if (!mSettings ->isEnabled (Settings::WARNING))
319319 return ;
320320
321- const SymbolDatabase* symbolDatabase = _tokenizer ->getSymbolDatabase ();
321+ const SymbolDatabase* symbolDatabase = mTokenizer ->getSymbolDatabase ();
322322
323323 for (const Scope * scope : symbolDatabase->functionScopes ) {
324324 for (const Token* tok = scope->bodyStart ->next (); tok != scope->bodyEnd ; tok = tok->next ()) {
@@ -359,7 +359,7 @@ void CheckBool::checkComparisonOfBoolExpressionWithInt()
359359 : Token::Match (tok, " >|==|!=" )))
360360 continue ;
361361 comparisonOfBoolExpressionWithIntError (tok, true );
362- } else if (isNonBoolStdType (numTok->variable ()) && _tokenizer ->isCPP ())
362+ } else if (isNonBoolStdType (numTok->variable ()) && mTokenizer ->isCPP ())
363363 comparisonOfBoolExpressionWithIntError (tok, false );
364364 }
365365 }
@@ -378,7 +378,7 @@ void CheckBool::comparisonOfBoolExpressionWithIntError(const Token *tok, bool n0
378378
379379void CheckBool::pointerArithBool ()
380380{
381- const SymbolDatabase* symbolDatabase = _tokenizer ->getSymbolDatabase ();
381+ const SymbolDatabase* symbolDatabase = mTokenizer ->getSymbolDatabase ();
382382
383383 for (const Scope &scope : symbolDatabase->scopeList ) {
384384 if (scope.type != Scope::eIf && scope.type != Scope::eWhile && scope.type != Scope::eDo && scope.type != Scope::eFor)
@@ -429,11 +429,11 @@ void CheckBool::pointerArithBoolError(const Token *tok)
429429
430430void CheckBool::checkAssignBoolToFloat ()
431431{
432- if (!_tokenizer ->isCPP ())
432+ if (!mTokenizer ->isCPP ())
433433 return ;
434- if (!_settings ->isEnabled (Settings::STYLE))
434+ if (!mSettings ->isEnabled (Settings::STYLE))
435435 return ;
436- const SymbolDatabase *symbolDatabase = _tokenizer ->getSymbolDatabase ();
436+ const SymbolDatabase *symbolDatabase = mTokenizer ->getSymbolDatabase ();
437437 for (const Scope * scope : symbolDatabase->functionScopes ) {
438438 for (const Token* tok = scope->bodyStart ; tok != scope->bodyEnd ; tok = tok->next ()) {
439439 if (tok->str () == " =" && astIsBool (tok->astOperand2 ())) {
0 commit comments