From cc8a6168e740a661fcbd8a20d500b2d7dd2f50a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 6 Mar 2009 18:13:41 +0100 Subject: [PATCH] astyle formatting --- src/cppcheck.cpp | 4 ++-- src/settings.cpp | 2 +- src/settings.h | 2 +- test/testmemleak.cpp | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cppcheck.cpp b/src/cppcheck.cpp index 7cf7fba4c..7ac8542f1 100644 --- a/src/cppcheck.cpp +++ b/src/cppcheck.cpp @@ -196,11 +196,11 @@ std::string CppCheck::parseFromArgs(int argc, const char* const argv[]) } // auto deallocated classes.. - else if (strcmp(argv[i], "--auto-dealloc")==0) + else if (strcmp(argv[i], "--auto-dealloc") == 0) { ++i; - if (i >= argc || !strstr(argv[i],".lst")) + if (i >= argc || !strstr(argv[i], ".lst")) return "No .lst file specified for the --auto-dealloc option\n"; std::ifstream f(argv[i]); diff --git a/src/settings.cpp b/src/settings.cpp index ca91cc2d7..d22132dbb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -45,7 +45,7 @@ Settings::~Settings() void Settings::autoDealloc(std::istream &istr) { std::string line; - while (getline(istr,line)) + while (getline(istr, line)) { // Check if line has a valid classname.. if (line.empty()) diff --git a/src/settings.h b/src/settings.h index adb9fffe6..05298757b 100644 --- a/src/settings.h +++ b/src/settings.h @@ -64,7 +64,7 @@ public: /** If errors are found, this value is returned from main(). Default value is 0. */ int _exitCode; - + /** Fill list of automaticly deallocated classes */ void autoDealloc(std::istream &istr); diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index b72e89c92..90ae1f40d 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -1936,8 +1936,8 @@ private: // Tokenize.. Tokenizer tokenizer; { - std::istringstream istr(code); - tokenizer.tokenize(istr, "test.cpp"); + std::istringstream istr(code); + tokenizer.tokenize(istr, "test.cpp"); } tokenizer.setVarId(); tokenizer.simplifyTokenList(); @@ -1949,10 +1949,10 @@ private: Settings settings; settings._debug = true; settings._showAll = true; - + { - std::istringstream istr(_autoDealloc); - settings.autoDealloc(istr); + std::istringstream istr(_autoDealloc); + settings.autoDealloc(istr); } CheckMemoryLeakClass checkMemoryLeak(&tokenizer, settings, this);