Skip to content

Commit

Permalink
astyle: Update to astyle 1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Marjamäki committed Apr 15, 2010
1 parent 3fa2137 commit c718a7c
Show file tree
Hide file tree
Showing 39 changed files with 248 additions and 246 deletions.
6 changes: 3 additions & 3 deletions cli/cppcheckexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ void CppCheckExecutor::reportStatus(unsigned int index, unsigned int max)
{
std::ostringstream oss;
oss << index << "/" << max
<< " files checked " <<
static_cast<int>(static_cast<double>(index) / max*100)
<< "% done";
<< " files checked " <<
static_cast<int>(static_cast<double>(index) / max*100)
<< "% done";
std::cout << oss.str() << std::endl;
}
}
Expand Down
2 changes: 1 addition & 1 deletion cli/threadexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#endif

ThreadExecutor::ThreadExecutor(const std::vector<std::string> &filenames, const Settings &settings, ErrorLogger &errorLogger)
: _filenames(filenames), _settings(settings), _errorLogger(errorLogger), _fileCount(0)
: _filenames(filenames), _settings(settings), _errorLogger(errorLogger), _fileCount(0)
{

}
Expand Down
2 changes: 1 addition & 1 deletion gui/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "aboutdialog.h"

AboutDialog::AboutDialog(const QString &version, QWidget *parent)
: QDialog(parent)
: QDialog(parent)
{
mUI.setupUi(this);

Expand Down
2 changes: 1 addition & 1 deletion gui/applicationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ApplicationDialog::ApplicationDialog(const QString &name,
const QString &path,
const QString &title,
QWidget *parent) :
QDialog(parent)
QDialog(parent)
{
mUI.setupUi(this);

Expand Down
2 changes: 1 addition & 1 deletion gui/applicationlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "common.h"

ApplicationList::ApplicationList(QObject *parent) :
QObject(parent)
QObject(parent)
{
//ctor
}
Expand Down
6 changes: 3 additions & 3 deletions gui/checkthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <QDebug>

CheckThread::CheckThread(ThreadResult &result) :
mState(Ready),
mResult(result),
mCppcheck(result)
mState(Ready),
mResult(result),
mCppcheck(result)
{
//ctor
}
Expand Down
2 changes: 1 addition & 1 deletion gui/csvreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "csvreport.h"

CsvReport::CsvReport(const QString &filename, QObject * parent) :
Report(filename, parent)
Report(filename, parent)
{
}

Expand Down
2 changes: 1 addition & 1 deletion gui/fileviewdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
FileViewDialog::FileViewDialog(const QString &file,
const QString &title,
QWidget *parent)
: QDialog(parent)
: QDialog(parent)
{
mUI.setupUi(this);

Expand Down
8 changes: 4 additions & 4 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
#endif

MainWindow::MainWindow() :
mSettings(new QSettings("Cppcheck", "Cppcheck-GUI", this)),
mApplications(new ApplicationList(this)),
mTranslation(new TranslationHandler(this)),
mLanguages(new QActionGroup(this))
mSettings(new QSettings("Cppcheck", "Cppcheck-GUI", this)),
mApplications(new ApplicationList(this)),
mTranslation(new TranslationHandler(this)),
mLanguages(new QActionGroup(this))
{
mUI.setupUi(this);
mUI.mResults->Initialize(mSettings, mApplications);
Expand Down
6 changes: 3 additions & 3 deletions gui/projectfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ static const char DirElementName[] = "dir";
static const char DirNameAttrib[] = "name";

ProjectFile::ProjectFile(QObject *parent) :
QObject(parent)
QObject(parent)
{
}

ProjectFile::ProjectFile(const QString &filename, QObject *parent) :
QObject(parent),
mFilename(filename)
QObject(parent),
mFilename(filename)
{
}

Expand Down
4 changes: 2 additions & 2 deletions gui/report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "report.h"

Report::Report(const QString &filename, QObject * parent) :
QObject(parent),
mFilename(filename)
QObject(parent),
mFilename(filename)
{
}

Expand Down
8 changes: 4 additions & 4 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include "xmlreport.h"

ResultsTree::ResultsTree(QWidget * parent) :
QTreeView(parent),
mContextItem(0),
mCheckPath(""),
mVisibleErrors(false)
QTreeView(parent),
mContextItem(0),
mCheckPath(""),
mVisibleErrors(false)
{
for (int i = 0; i < SHOW_NONE; i++)
mShowTypes[i] = false;
Expand Down
9 changes: 5 additions & 4 deletions gui/resultsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#include "csvreport.h"

ResultsView::ResultsView(QWidget * parent) :
QWidget(parent),
mErrorsFound(false),
mShowNoErrorsMessage(true)
QWidget(parent),
mErrorsFound(false),
mShowNoErrorsMessage(true)
{
mUI.setupUi(this);
}
Expand Down Expand Up @@ -72,7 +72,8 @@ void ResultsView::Progress(int value, int max)
mUI.mProgress->setVisible(false);
//Should we inform user of non visible/not found errors?
if (mShowNoErrorsMessage)
{ //Tell user that we found no errors
{
//Tell user that we found no errors
if (!mErrorsFound)
{
QMessageBox msg(QMessageBox::Information,
Expand Down
8 changes: 4 additions & 4 deletions gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
SettingsDialog::SettingsDialog(QSettings *programSettings,
ApplicationList *list,
QWidget *parent) :
QDialog(parent),
mSettings(programSettings),
mApplications(list),
mTempApplications(new ApplicationList(this))
QDialog(parent),
mSettings(programSettings),
mApplications(list),
mTempApplications(new ApplicationList(this))
{
mUI.setupUi(this);
mTempApplications->Copy(list);
Expand Down
4 changes: 2 additions & 2 deletions gui/threadhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <QDebug>

ThreadHandler::ThreadHandler(QObject *parent) :
QObject(parent),
mRunningThreadCount(0)
QObject(parent),
mRunningThreadCount(0)
{
SetThreadCount(1);
}
Expand Down
30 changes: 15 additions & 15 deletions gui/translationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@
#include <QLocale>

TranslationHandler::TranslationHandler(QObject *parent) :
QObject(parent),
mCurrentLanguage(-1),
mTranslator(new QTranslator(this))
QObject(parent),
mCurrentLanguage(-1),
mTranslator(new QTranslator(this))
{
//Add our default languages
mNames << QT_TRANSLATE_NOOP("MainWindow", "English")
<< QT_TRANSLATE_NOOP("MainWindow", "Dutch")
<< QT_TRANSLATE_NOOP("MainWindow", "Finnish")
<< QT_TRANSLATE_NOOP("MainWindow", "Swedish")
<< QT_TRANSLATE_NOOP("MainWindow", "German")
<< QT_TRANSLATE_NOOP("MainWindow", "Russian")
<< QT_TRANSLATE_NOOP("MainWindow", "Polish");
<< QT_TRANSLATE_NOOP("MainWindow", "Dutch")
<< QT_TRANSLATE_NOOP("MainWindow", "Finnish")
<< QT_TRANSLATE_NOOP("MainWindow", "Swedish")
<< QT_TRANSLATE_NOOP("MainWindow", "German")
<< QT_TRANSLATE_NOOP("MainWindow", "Russian")
<< QT_TRANSLATE_NOOP("MainWindow", "Polish");

mFiles << "cppcheck_en"
<< "cppcheck_nl"
<< "cppcheck_fi"
<< "cppcheck_se"
<< "cppcheck_de"
<< "cppcheck_ru"
<< "cppcheck_pl";
<< "cppcheck_nl"
<< "cppcheck_fi"
<< "cppcheck_se"
<< "cppcheck_de"
<< "cppcheck_ru"
<< "cppcheck_pl";

//Load english as a fallback language
QTranslator *english = new QTranslator();
Expand Down
2 changes: 1 addition & 1 deletion gui/txtreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "txtreport.h"

TxtReport::TxtReport(const QString &filename, QObject * parent) :
Report(filename, parent)
Report(filename, parent)
{
}

Expand Down
2 changes: 1 addition & 1 deletion gui/xmlreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "xmlreport.h"

XmlReport::XmlReport(const QString &filename, QObject * parent) :
Report(filename, parent)
Report(filename, parent)
{
}

Expand Down
4 changes: 2 additions & 2 deletions lib/check.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class Check
public:
/** This constructor is used when registering the CheckClass */
Check()
: _tokenizer(0), _settings(0), _errorLogger(0)
: _tokenizer(0), _settings(0), _errorLogger(0)
{
instances().push_back(this);
instances().sort();
}

/** This constructor is used when running checks. */
Check(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: _tokenizer(tokenizer), _settings(settings), _errorLogger(errorLogger)
: _tokenizer(tokenizer), _settings(settings), _errorLogger(errorLogger)
{ }

virtual ~Check()
Expand Down
2 changes: 1 addition & 1 deletion lib/checkautovariables.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CheckAutoVariables : public Check

/** This constructor is used when running checks. */
CheckAutoVariables(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: Check(tokenizer, settings, errorLogger)
: Check(tokenizer, settings, errorLogger)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
Expand Down
8 changes: 4 additions & 4 deletions lib/checkbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TokenStrEquals
* @param str Token::str() is compared against this.
*/
TokenStrEquals(const std::string &str)
: value(str)
: value(str)
{
}

Expand Down Expand Up @@ -1294,7 +1294,7 @@ class ExecutionPathBufferOverrun : public ExecutionPath
public:
/** Startup constructor */
ExecutionPathBufferOverrun(Check *c, const std::map<unsigned int, ArrayInfo> &arrayinfo)
: ExecutionPath(c, 0), arrayInfo(arrayinfo)
: ExecutionPath(c, 0), arrayInfo(arrayinfo)
{
}

Expand All @@ -1313,8 +1313,8 @@ class ExecutionPathBufferOverrun : public ExecutionPath

/** internal constructor for creating extra checks */
ExecutionPathBufferOverrun(Check *c, const std::map<unsigned int, ArrayInfo> &arrayinfo, unsigned int varid_)
: ExecutionPath(c, varid_),
arrayInfo(arrayinfo)
: ExecutionPath(c, varid_),
arrayInfo(arrayinfo)
{
// Pretend that variables are initialized to 0
// This checking is not about uninitialized variables
Expand Down
2 changes: 1 addition & 1 deletion lib/checkbufferoverrun.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CheckBufferOverrun : public Check

/** This constructor is used when running checks. */
CheckBufferOverrun(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: Check(tokenizer, settings, errorLogger)
: Check(tokenizer, settings, errorLogger)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
Expand Down
14 changes: 7 additions & 7 deletions lib/checkclass.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CheckClass : public Check

/** @brief This constructor is used when running checks. */
CheckClass(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: Check(tokenizer, settings, errorLogger)
: Check(tokenizer, settings, errorLogger)
{ }

/** @brief Run checks on the normal token list */
Expand Down Expand Up @@ -114,12 +114,12 @@ class CheckClass : public Check
{
public:
Var(const std::string &name_, bool init_ = false, bool priv_ = false, bool mutable_ = false, bool static_ = false, Var *next_ = 0)
: name(name_),
init(init_),
priv(priv_),
isMutable(mutable_),
isStatic(static_),
next(next_)
: name(name_),
init(init_),
priv(priv_),
isMutable(mutable_),
isStatic(static_),
next(next_)
{
}

Expand Down
2 changes: 1 addition & 1 deletion lib/checkdangerousfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CheckDangerousFunctions : public Check

/** This constructor is used when running checks. */
CheckDangerousFunctions(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: Check(tokenizer, settings, errorLogger)
: Check(tokenizer, settings, errorLogger)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
Expand Down
2 changes: 1 addition & 1 deletion lib/checkexceptionsafety.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CheckExceptionSafety : public Check

/** This constructor is used when running checks. */
CheckExceptionSafety(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
: Check(tokenizer, settings, errorLogger)
: Check(tokenizer, settings, errorLogger)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
Expand Down
8 changes: 4 additions & 4 deletions lib/checkmemoryleak.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CheckMemoryLeak

public:
CheckMemoryLeak(const Tokenizer *t, ErrorLogger *e)
: tokenizer(t), errorLogger(e)
: tokenizer(t), errorLogger(e)
{

}
Expand Down Expand Up @@ -172,7 +172,7 @@ class CheckMemoryLeakInFunction : private Check, public CheckMemoryLeak

/** @brief This constructor is used when running checks */
CheckMemoryLeakInFunction(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
{ }

/** @brief run all simplified checks */
Expand Down Expand Up @@ -340,7 +340,7 @@ class CheckMemoryLeakInClass : private Check, private CheckMemoryLeak
{ }

CheckMemoryLeakInClass(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog)
Expand Down Expand Up @@ -380,7 +380,7 @@ class CheckMemoryLeakStructMember : private Check, private CheckMemoryLeak
{ }

CheckMemoryLeakStructMember(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
: Check(tokenizr, settings, errLog), CheckMemoryLeak(tokenizr, errLog)
{ }

void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog)
Expand Down
Loading

0 comments on commit c718a7c

Please sign in to comment.