From b660cf89ef729ef72d7bca84e72f829ae0d0437e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 10 Feb 2013 23:53:01 +0100 Subject: [PATCH] astyle formatting --- gui/mainwindow.cpp | 4 +--- gui/mainwindow.h | 2 +- gui/resultstree.cpp | 8 ++++---- lib/checkuninitvar.cpp | 5 ++--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 2d5ef7426..954c02e78 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -207,9 +207,7 @@ void MainWindow::HandleCLIParams(const QStringList ¶ms) checkedDir = params[ind + 1]; LoadResults(logFile, checkedDir); - } - else - { + } else { LoadResults(logFile); } } else diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 774157823..b6f3f6c74 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -404,7 +404,7 @@ private: * @param params List of string given to command line. */ void HandleCLIParams(const QStringList ¶ms); - + /** * @brief Load XML file to the GUI. * @param file Filename (inc. path) of XML file to load. diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 6f03f07ca..3155c5101 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -535,7 +535,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e) QAction *copymessageid = new QAction(tr("Copy message id"), &menu); QAction *hide = new QAction(tr("Hide"), &menu); QAction *hideallid = new QAction(tr("Hide all with id"), &menu); - + if (multipleSelection) { copyfilename->setDisabled(true); copypath->setDisabled(true); @@ -784,7 +784,7 @@ void ResultsTree::HideAllIdResult() if (!file) { continue; } - + //Get the amount of errors this file contains int errorcount = file->rowCount(); @@ -792,9 +792,9 @@ void ResultsTree::HideAllIdResult() //Get the error itself QStandardItem *child = file->child(j, 0); if (!child) { - continue; + continue; } - + QVariantMap userdata = child->data().toMap(); if (userdata["id"].toString() == messageId) { userdata["hide"] = true; diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index e449d003c..d828533e5 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -278,12 +278,11 @@ private: CheckUninitVar *checkUninitVar = dynamic_cast(c->owner); if (checkUninitVar) { if (c->strncpy_ || c->memset_nonzero) { - if(!Token::Match(c->var->typeStartToken(), "char|wchar_t")) { + if (!Token::Match(c->var->typeStartToken(), "char|wchar_t")) { continue; } checkUninitVar->uninitstringError(tok, c->var->name(), c->strncpy_); - } - else if (c->var->isPointer() && !c->var->isArray() && c->alloc) + } else if (c->var->isPointer() && !c->var->isArray() && c->alloc) checkUninitVar->uninitdataError(tok, c->var->name()); else checkUninitVar->uninitvarError(tok, c->var->name());