From 06e818f89d88426affa9eb301ebb41ecb8a6609b Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 17 Jun 2015 09:09:23 +0200 Subject: [PATCH] Running astyle, no functional change. --- lib/checkio.cpp | 14 +++++++------- lib/checkio.h | 2 +- lib/tokenize.cpp | 12 ++++++------ lib/tokenize.h | 2 +- test/testtokenize.cpp | 2 +- test/testunusedprivfunc.cpp | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/checkio.cpp b/lib/checkio.cpp index bda08435c..3ea9565bb 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -685,7 +685,7 @@ void CheckIO::checkWrongPrintfScanfArguments() } // Perform type checks - ArgumentInfo argInfo(argListTok, _settings, _tokenizer->isCPP()); + ArgumentInfo argInfo(argListTok, _settings, _tokenizer->isCPP()); if (argInfo.typeToken && !argInfo.isLibraryType(_settings)) { if (scan) { @@ -1383,7 +1383,7 @@ CheckIO::ArgumentInfo::ArgumentInfo(const Token * tok, const Settings *settings, , _template(false) , address(false) , tempToken(0) - , isCPP(isCPP) + , isCPP(isCPP) { if (tok) { if (tok->type() == Token::eString) { @@ -1445,7 +1445,7 @@ CheckIO::ArgumentInfo::ArgumentInfo(const Token * tok, const Settings *settings, // check for some common well known functions else if (isCPP && ((Token::Match(tok1->previous(), "%var% . size|empty|c_str ( ) [,)]") && isStdContainer(tok1->previous())) || - (Token::Match(tok1->previous(), "] . size|empty|c_str ( ) [,)]") && isStdContainer(tok1->previous()->link()->previous())))) { + (Token::Match(tok1->previous(), "] . size|empty|c_str ( ) [,)]") && isStdContainer(tok1->previous()->link()->previous())))) { tempToken = new Token(0); tempToken->fileIndex(tok1->fileIndex()); tempToken->linenr(tok1->linenr()); @@ -1530,8 +1530,8 @@ namespace { bool CheckIO::ArgumentInfo::isStdVectorOrString() { - if (!isCPP) - return false; + if (!isCPP) + return false; if (variableInfo->isStlType(stl_vector)) { typeToken = variableInfo->typeStartToken()->tokAt(4); _template = true; @@ -1595,8 +1595,8 @@ namespace { bool CheckIO::ArgumentInfo::isStdContainer(const Token *tok) { - if (!isCPP) - return false; + if (!isCPP) + return false; if (tok && tok->variable()) { const Variable* variable = tok->variable(); if (variable->isStlType(stl_container)) { diff --git a/lib/checkio.h b/lib/checkio.h index 70af2d25e..0f258838b 100644 --- a/lib/checkio.h +++ b/lib/checkio.h @@ -86,7 +86,7 @@ private: bool element; bool _template; bool address; - bool isCPP; + bool isCPP; Token *tempToken; private: diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index a9aa2bd53..c68de76d6 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1975,7 +1975,7 @@ void Tokenizer::concatenateNegativeNumberAndAnyPositive() void Tokenizer::simplifyExternC() { - if (isC()) + if (isC()) return; for (Token *tok = list.front(); tok; tok = tok->next()) { if (Token::Match(tok, "extern \"C\" {|")) { @@ -9492,9 +9492,9 @@ void Tokenizer::simplifyAsm() } } -void Tokenizer::simplifyAsm2() +void Tokenizer::simplifyAsm2() { - // Put ^{} statements in asm() + // Put ^{} statements in asm() for (Token *tok = list.front(); tok; tok = tok->next()) { if (Token::simpleMatch(tok, "^ {")) { Token * start = tok; @@ -9849,13 +9849,13 @@ void Tokenizer::simplifyMicrosoftStringFunctions() // Remove Borland code void Tokenizer::simplifyBorland() { - // skip if not Windows + // skip if not Windows if (_settings->platformType != Settings::Win32A && _settings->platformType != Settings::Win32W && _settings->platformType != Settings::Win64) return; - if (isC()) - return; + if (isC()) + return; for (Token *tok = list.front(); tok; tok = tok->next()) { if (Token::Match(tok, "( __closure * %name% )")) { tok->deleteNext(); diff --git a/lib/tokenize.h b/lib/tokenize.h index 91d41499c..6ea5b7d2c 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -620,7 +620,7 @@ public: */ void simplifyAsm(); - /** + /** * asm heuristics, Put ^{} statements in asm() */ void simplifyAsm2(); diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 8c624a617..4ef6f2bc0 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -5868,7 +5868,7 @@ private: void borland() { // __closure ASSERT_EQUALS("int * a ;", - tokenizeAndStringify("int (__closure *a)();", false, true, Settings::Win32A)); + tokenizeAndStringify("int (__closure *a)();", false, true, Settings::Win32A)); // __property ASSERT_EQUALS("class Fred { ; __property ; } ;", diff --git a/test/testunusedprivfunc.cpp b/test/testunusedprivfunc.cpp index 91dc9991c..60205e2aa 100644 --- a/test/testunusedprivfunc.cpp +++ b/test/testunusedprivfunc.cpp @@ -75,13 +75,13 @@ private: } - void check(const char code[], Settings::PlatformType platform = Settings::Unspecified) { + void check(const char code[], Settings::PlatformType platform = Settings::Unspecified) { // Clear the error buffer.. errout.str(""); Settings settings; settings.addEnabled("style"); - settings.platform(platform); + settings.platform(platform); // Tokenize.. Tokenizer tokenizer(&settings, this); @@ -518,7 +518,7 @@ private: "public:\n" " Foo() { }\n" " __property int x = {read=getx}\n" - "};", Settings::Win32A); + "};", Settings::Win32A); ASSERT_EQUALS("", errout.str()); }