Skip to content

Commit 051d42a

Browse files
committed
astyle formatting
1 parent 9cbab3d commit 051d42a

File tree

132 files changed

+3690
-7333
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

+3690
-7333
lines changed

cli/cmdlineparser.h

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

6261
/**
6362
* Return if user wanted to see list of error messages.
6463
*/
65-
bool GetShowErrorMessages() const
66-
{
64+
bool GetShowErrorMessages() const {
6765
return _showErrorMessages;
6866
}
6967

7068
/**
7169
* Return the path names user gave to command line.
7270
*/
73-
const std::vector<std::string>& GetPathNames() const
74-
{
71+
const std::vector<std::string>& GetPathNames() const {
7572
return _pathnames;
7673
}
7774

7875
/**
7976
* Return if help is shown to user.
8077
*/
81-
bool GetShowHelp() const
82-
{
78+
bool GetShowHelp() const {
8379
return _showHelp;
8480
}
8581

8682
/**
8783
* Return if we should exit after printing version, help etc.
8884
*/
89-
bool ExitAfterPrinting() const
90-
{
85+
bool ExitAfterPrinting() const {
9186
return _exitAfterPrint;
9287
}
9388

9489
/**
9590
* Return a list of paths user wants to ignore.
9691
*/
97-
const std::vector<std::string>& GetIgnoredPaths() const
98-
{
92+
const std::vector<std::string>& GetIgnoredPaths() const {
9993
return _ignoredPaths;
10094
}
10195

cli/filelister.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ 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)
41-
{
40+
static void recursiveAddFiles(std::map<std::string, std::size_t> &files, const std::string &path) {
4241
const std::set<std::string> extra;
4342
recursiveAddFiles(files, path, extra);
4443
}

cli/threadexecutor.h

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

@@ -129,17 +128,15 @@ class ThreadExecutor : public ErrorLogger {
129128
/**
130129
* @return true if support for threads exist.
131130
*/
132-
static bool isEnabled()
133-
{
131+
static bool isEnabled() {
134132
return true;
135133
}
136134
#else
137135
public:
138136
/**
139137
* @return true if support for threads exist.
140138
*/
141-
static bool isEnabled()
142-
{
139+
static bool isEnabled() {
143140
return false;
144141
}
145142
#endif

democlient/democlient.cpp

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

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

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

5350
void reportProgress(const
5451
std::string &filename,
5552
const char stage[],
56-
const unsigned int value)
57-
{
53+
const unsigned int value) {
5854
if (std::time(NULL) >= stoptime) {
5955
printf("time to analyse the "
6056
"code is more than 1 "

gui/application.h

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

5756
/**
5857
* @brief Get application path.
5958
* @return Application path.
6059
*/
61-
QString getPath() const
62-
{
60+
QString getPath() const {
6361
return mPath;
6462
}
6563

6664
/**
6765
* @brief Get application command line parameters.
6866
* @return Application command line parameters.
6967
*/
70-
QString getParameters() const
71-
{
68+
QString getParameters() const {
7269
return mParameters;
7370
}
7471

7572
/**
7673
* @brief Set application name.
7774
* @param name Application name.
7875
*/
79-
void setName(const QString &name)
80-
{
76+
void setName(const QString &name) {
8177
mName = name;
8278
}
8379

8480
/**
8581
* @brief Set application path.
8682
* @param path Application path.
8783
*/
88-
void setPath(const QString &path)
89-
{
84+
void setPath(const QString &path) {
9085
mPath = path;
9186
}
9287

9388
/**
9489
* @brief Set application command line parameters.
9590
* @param parameters Application command line parameters.
9691
*/
97-
void setParameters(const QString &parameters)
98-
{
92+
void setParameters(const QString &parameters) {
9993
mParameters = parameters;
10094
}
10195

gui/applicationlist.h

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

gui/erroritem.h

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

45-
static Severity::SeverityType fromString(const QString &severity)
46-
{
44+
static Severity::SeverityType fromString(const QString &severity) {
4745
return Severity::fromString(severity.toStdString());
4846
}
4947
};

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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ class Project : public QObject {
7979
* @brief Return current project file.
8080
* @return project file.
8181
*/
82-
ProjectFile * GetProjectFile() const
83-
{
82+
ProjectFile * GetProjectFile() const {
8483
return mPFile;
8584
}
8685

0 commit comments

Comments
 (0)