From b435764083eae89bf20825d35560267ff99072fc Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sun, 30 Aug 2009 02:17:17 +0700 Subject: [PATCH] Tokenizer::simplifyIfAssign(): change return type to void. No functional change. --- src/tokenize.cpp | 9 +-------- src/tokenize.h | 4 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/tokenize.cpp b/src/tokenize.cpp index 2c4b90beb..bba161bee 100644 --- a/src/tokenize.cpp +++ b/src/tokenize.cpp @@ -2579,10 +2579,8 @@ void Tokenizer::unsignedint() } -bool Tokenizer::simplifyIfAssign() +void Tokenizer::simplifyIfAssign() { - bool ret = false; - for (Token *tok = _tokens; tok; tok = tok->next()) { if (!Token::Match(tok->next(), "if|while ( !| (| %var% =") && @@ -2595,9 +2593,6 @@ bool Tokenizer::simplifyIfAssign() // delete the "if" tok->deleteNext(); - // The tokenlist has changed - ret = true; - // Remember if there is a "!" or not. And delete it if there are. const bool isNot(tok->tokAt(2)->str() == "!"); if (isNot) @@ -2690,8 +2685,6 @@ bool Tokenizer::simplifyIfAssign() } } } - - return ret; } diff --git a/src/tokenize.h b/src/tokenize.h index b0c3efb34..2daee628c 100644 --- a/src/tokenize.h +++ b/src/tokenize.h @@ -138,10 +138,8 @@ private: /** * simplify if-assignments.. * Example: "if(a=b);" => "a=b;if(a);" - * @return true if something is modified - * false if nothing is done. */ - bool simplifyIfAssign(); + void simplifyIfAssign(); /** * simplify if-not..