From 030a0c19df645208e7b09a1409a1d37382058e51 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sun, 30 Aug 2009 02:07:09 +0700 Subject: [PATCH] Tokenizer::simplifyVarDecl(): change return type to void. No functional change. --- src/tokenize.cpp | 8 +------- src/tokenize.h | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/tokenize.cpp b/src/tokenize.cpp index 61f76e8e2..2c4b90beb 100644 --- a/src/tokenize.cpp +++ b/src/tokenize.cpp @@ -2356,12 +2356,10 @@ static void incdec(std::string &value, const std::string &op) -bool Tokenizer::simplifyVarDecl() +void Tokenizer::simplifyVarDecl() { // Split up variable declarations.. // "int a=4;" => "int a; a=4;" - bool ret = false; - for (Token *tok = _tokens; tok; tok = tok->next()) { if (tok->previous() && !Token::Match(tok->previous(), "[{};)]")) @@ -2506,8 +2504,6 @@ bool Tokenizer::simplifyVarDecl() if (tok2) { - ret = true; - if (tok2->str() == ",") { tok2->str(";"); @@ -2556,8 +2552,6 @@ bool Tokenizer::simplifyVarDecl() } } } - - return ret; } diff --git a/src/tokenize.h b/src/tokenize.h index 9356c955f..b0c3efb34 100644 --- a/src/tokenize.h +++ b/src/tokenize.h @@ -118,10 +118,8 @@ private: /** * Simplify variable declarations - * @return true if something is modified - * false if nothing is done. */ - bool simplifyVarDecl(); + void simplifyVarDecl(); /** * insert an "int" after "unsigned" if needed: