Skip to content

Commit f5d804f

Browse files
committed
running astyle
1 parent b1329bf commit f5d804f

File tree

132 files changed

+7331
-3689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+7331
-3689
lines changed

cli/cmdlineparser.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,42 +54,48 @@ class CmdLineParser {
5454
/**
5555
* Return if user wanted to see program version.
5656
*/
57-
bool GetShowVersion() const {
57+
bool GetShowVersion() const
58+
{
5859
return _showVersion;
5960
}
6061

6162
/**
6263
* Return if user wanted to see list of error messages.
6364
*/
64-
bool GetShowErrorMessages() const {
65+
bool GetShowErrorMessages() const
66+
{
6567
return _showErrorMessages;
6668
}
6769

6870
/**
6971
* Return the path names user gave to command line.
7072
*/
71-
const std::vector<std::string>& GetPathNames() const {
73+
const std::vector<std::string>& GetPathNames() const
74+
{
7275
return _pathnames;
7376
}
7477

7578
/**
7679
* Return if help is shown to user.
7780
*/
78-
bool GetShowHelp() const {
81+
bool GetShowHelp() const
82+
{
7983
return _showHelp;
8084
}
8185

8286
/**
8387
* Return if we should exit after printing version, help etc.
8488
*/
85-
bool ExitAfterPrinting() const {
89+
bool ExitAfterPrinting() const
90+
{
8691
return _exitAfterPrint;
8792
}
8893

8994
/**
9095
* Return a list of paths user wants to ignore.
9196
*/
92-
const std::vector<std::string>& GetIgnoredPaths() const {
97+
const std::vector<std::string>& GetIgnoredPaths() const
98+
{
9399
return _ignoredPaths;
94100
}
95101

cli/filelister.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class FileLister {
3737
* @param files output map that associates the size of each file with its name
3838
* @param path root path
3939
*/
40-
static void recursiveAddFiles(std::map<std::string, std::size_t> &files, const std::string &path) {
40+
static void recursiveAddFiles(std::map<std::string, std::size_t> &files, const std::string &path)
41+
{
4142
const std::set<std::string> extra;
4243
recursiveAddFiles(files, path, extra);
4344
}

cli/threadexecutor.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class ThreadExecutor : public ErrorLogger {
9898
/**
9999
* @return true if support for threads exist.
100100
*/
101-
static bool isEnabled() {
101+
static bool isEnabled()
102+
{
102103
return true;
103104
}
104105

@@ -128,15 +129,17 @@ class ThreadExecutor : public ErrorLogger {
128129
/**
129130
* @return true if support for threads exist.
130131
*/
131-
static bool isEnabled() {
132+
static bool isEnabled()
133+
{
132134
return true;
133135
}
134136
#else
135137
public:
136138
/**
137139
* @return true if support for threads exist.
138140
*/
139-
static bool isEnabled() {
141+
static bool isEnabled()
142+
{
140143
return false;
141144
}
142145
#endif

democlient/democlient.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,28 @@ class CppcheckExecutor : public ErrorLogger {
3333
CppcheckExecutor()
3434
: ErrorLogger()
3535
, stoptime(std::time(NULL)+2U)
36-
, cppcheck(*this,false) {
36+
, cppcheck(*this,false)
37+
{
3738
cppcheck.settings().addEnabled("all");
3839
cppcheck.settings().inconclusive = true;
3940
}
4041

41-
void run(const char code[]) {
42+
void run(const char code[])
43+
{
4244
cppcheck.check("test.c", code);
4345
}
4446

4547
void reportOut(const std::string &outmsg) { }
46-
void reportErr(const ErrorLogger::ErrorMessage &msg) {
48+
void reportErr(const ErrorLogger::ErrorMessage &msg)
49+
{
4750
printf("%s\n", msg.toString(true).c_str());
4851
}
4952

5053
void reportProgress(const
5154
std::string &filename,
5255
const char stage[],
53-
const unsigned int value) {
56+
const unsigned int value)
57+
{
5458
if (std::time(NULL) >= stoptime) {
5559
printf("time to analyse the "
5660
"code is more than 1 "

gui/application.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,47 +49,53 @@ class Application {
4949
* @brief Get application name.
5050
* @return Application name.
5151
*/
52-
QString getName() const {
52+
QString getName() const
53+
{
5354
return mName;
5455
}
5556

5657
/**
5758
* @brief Get application path.
5859
* @return Application path.
5960
*/
60-
QString getPath() const {
61+
QString getPath() const
62+
{
6163
return mPath;
6264
}
6365

6466
/**
6567
* @brief Get application command line parameters.
6668
* @return Application command line parameters.
6769
*/
68-
QString getParameters() const {
70+
QString getParameters() const
71+
{
6972
return mParameters;
7073
}
7174

7275
/**
7376
* @brief Set application name.
7477
* @param name Application name.
7578
*/
76-
void setName(const QString &name) {
79+
void setName(const QString &name)
80+
{
7781
mName = name;
7882
}
7983

8084
/**
8185
* @brief Set application path.
8286
* @param path Application path.
8387
*/
84-
void setPath(const QString &path) {
88+
void setPath(const QString &path)
89+
{
8590
mPath = path;
8691
}
8792

8893
/**
8994
* @brief Set application command line parameters.
9095
* @param parameters Application command line parameters.
9196
*/
92-
void setParameters(const QString &parameters) {
97+
void setParameters(const QString &parameters)
98+
{
9399
mParameters = parameters;
94100
}
95101

gui/applicationlist.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ class ApplicationList : public QObject {
6969
* @brief Return the default application.
7070
* @return Index of the default application.
7171
*/
72-
int GetDefaultApplication() const {
72+
int GetDefaultApplication() const
73+
{
7374
return mDefaultApplicationIndex;
7475
}
7576

gui/erroritem.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ class ErrorLine;
3737
*/
3838
class GuiSeverity {
3939
public:
40-
static QString toString(Severity::SeverityType severity) {
40+
static QString toString(Severity::SeverityType severity)
41+
{
4142
return QString(Severity::toString(severity).c_str());
4243
}
4344

44-
static Severity::SeverityType fromString(const QString &severity) {
45+
static Severity::SeverityType fromString(const QString &severity)
46+
{
4547
return Severity::fromString(severity.toStdString());
4648
}
4749
};

gui/filelist.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void FileList::AddDirectory(const QString &directory, bool recursive)
6868
dir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
6969
QFileInfoList list = dir.entryInfoList();
7070
QFileInfo item;
71-
foreach(item, list) {
71+
foreach (item, list) {
7272
const QString path = item.canonicalFilePath();
7373
AddDirectory(path, recursive);
7474
}
@@ -78,7 +78,7 @@ void FileList::AddDirectory(const QString &directory, bool recursive)
7878
void FileList::AddPathList(const QStringList &paths)
7979
{
8080
QString path;
81-
foreach(path, paths) {
81+
foreach (path, paths) {
8282
QFileInfo inf(path);
8383
if (inf.isFile())
8484
AddFile(path);
@@ -91,7 +91,7 @@ QStringList FileList::GetFileList() const
9191
{
9292
if (mExcludedPaths.empty()) {
9393
QStringList names;
94-
foreach(QFileInfo item, mFileList) {
94+
foreach (QFileInfo item, mFileList) {
9595
QString name = QDir::fromNativeSeparators(item.canonicalFilePath());
9696
names << name;
9797
}
@@ -109,7 +109,7 @@ void FileList::AddExcludeList(const QStringList &paths)
109109
QStringList FileList::ApplyExcludeList() const
110110
{
111111
QStringList paths;
112-
foreach(QFileInfo item, mFileList) {
112+
foreach (QFileInfo item, mFileList) {
113113
QString name = QDir::fromNativeSeparators(item.canonicalFilePath());
114114
if (!Match(name))
115115
paths << name;

gui/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
5757
QSettings* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
5858

5959
// Set data dir..
60-
foreach(const QString arg, app.arguments()) {
60+
foreach (const QString arg, app.arguments()) {
6161
if (arg.startsWith("--data-dir=")) {
6262
settings->setValue("DATADIR", arg.mid(11));
6363
return 0;

gui/mainwindow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void MainWindow::CheckDirectory()
499499
void MainWindow::AddIncludeDirs(const QStringList &includeDirs, Settings &result)
500500
{
501501
QString dir;
502-
foreach(dir, includeDirs) {
502+
foreach (dir, includeDirs) {
503503
QString incdir;
504504
if (!QDir::isAbsolutePath(dir))
505505
incdir = mCurrentDirectory + "/";
@@ -560,14 +560,14 @@ Settings MainWindow::GetCppcheckSettings()
560560

561561
QStringList defines = pfile->GetDefines();
562562
QString define;
563-
foreach(define, defines) {
563+
foreach (define, defines) {
564564
if (!result.userDefines.empty())
565565
result.userDefines += ";";
566566
result.userDefines += define.toStdString();
567567
}
568568

569569
QStringList libraries = pfile->GetLibraries();
570-
foreach(QString library, libraries) {
570+
foreach (QString library, libraries) {
571571
const QString filename = library + ".cfg";
572572
const Library::Error error = LoadLibrary(&result.library, filename);
573573
if (error.errorcode != Library::ErrorCode::OK) {
@@ -604,7 +604,7 @@ Settings MainWindow::GetCppcheckSettings()
604604
}
605605

606606
QStringList suppressions = pfile->GetSuppressions();
607-
foreach(QString suppression, suppressions) {
607+
foreach (QString suppression, suppressions) {
608608
result.nomsg.addSuppressionLine(suppression.toStdString());
609609
}
610610

gui/project.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class Project : public QObject {
7979
* @brief Return current project file.
8080
* @return project file.
8181
*/
82-
ProjectFile * GetProjectFile() const {
82+
ProjectFile * GetProjectFile() const
83+
{
8384
return mPFile;
8485
}
8586

0 commit comments

Comments
 (0)