Skip to content

Commit 50cdb6c

Browse files
Astyle: sync windows and linux folders (danmar#3016)
1 parent a7f0e91 commit 50cdb6c

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

lib/astutils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,8 @@ bool exprDependsOnThis(const Token* expr, nonneg int depth)
648648
return exprDependsOnThis(expr->astOperand1(), depth) || exprDependsOnThis(expr->astOperand2(), depth);
649649
}
650650

651-
static bool hasUnknownVars(const Token* startTok) {
651+
static bool hasUnknownVars(const Token* startTok)
652+
{
652653
bool result = false;
653654
visitAstNodes(startTok, [&](const Token* tok) {
654655
if (tok->varId() > 0 && !tok->variable()) {

lib/checkbufferoverrun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ void CheckBufferOverrun::objectIndex()
890890
continue;
891891

892892
std::vector<ValueFlow::Value> values = getLifetimeObjValues(obj, false, true);
893-
for(const ValueFlow::Value& v:values) {
893+
for (const ValueFlow::Value& v:values) {
894894
if (v.lifetimeKind != ValueFlow::Value::LifetimeKind::Address)
895895
continue;
896896
const Variable *var = v.tokvalue->variable();

lib/forwardanalyzer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,7 @@ struct ForwardTraversal {
451451
if (!thenBranch.isConclusiveEscape()) {
452452
if (!analyzer->lowerToInconclusive())
453453
return Progress::Break;
454-
}
455-
else if (thenBranch.check) {
454+
} else if (thenBranch.check) {
456455
return Progress::Break;
457456
} else {
458457
if (analyzer->isConditional() && stopUpdates())

runastyle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ formatCplusplus "test/*.cpp"
5858
formatCplusplus "test/cfg/*.c"
5959
formatCplusplus "test/cfg/*.cpp"
6060
formatCplusplus "test/*.h"
61-
formatCplusplus "tools/*.cpp"
61+
formatCplusplusRecursive "tools/*.cpp"
6262
formatCplusplusRecursive "tools/*.h"
6363
formatCplusplusRecursive "samples/*.c"
6464
formatCplusplusRecursive "samples/*.cpp"

runastyle.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
%ASTYLE% --options=%RCFILE% -r gui/test/*.h
3131
%ASTYLE% --options=%RCFILE% lib/*.cpp
3232
%ASTYLE% --options=%RCFILE% lib/*.h
33+
%ASTYLE% --options=%RCFILE% oss-fuzz/*.cpp
34+
%ASTYLE% --options=%RCFILE% oss-fuzz/*.h
3335
%ASTYLE% --options=%RCFILE% test/*.cpp
3436
%ASTYLE% --options=%RCFILE% test/cfg/*.c
3537
%ASTYLE% --options=%RCFILE% test/cfg/*.cpp

tools/triage/mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ MainWindow::MainWindow(QWidget *parent) :
3636
mFSmodel.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
3737
ui->directoryTree->setModel(&mFSmodel);
3838
QHeaderView * header = ui->directoryTree->header();
39-
for(int i = 1; i < header->length(); ++i) // hide all except [0]
39+
for (int i = 1; i < header->length(); ++i) // hide all except [0]
4040
header->hideSection(i);
4141
ui->directoryTree->setRootIndex(mFSmodel.index(WORK_FOLDER));
4242

@@ -276,9 +276,9 @@ void MainWindow::findInFilesClicked()
276276
const QString text = ui->filterEdit->text();
277277

278278
QStringList filter;
279-
if(ui->hFilesFilter->isChecked())
279+
if (ui->hFilesFilter->isChecked())
280280
filter.append(hFiles);
281-
if(ui->srcFilesFilter->isChecked())
281+
if (ui->srcFilesFilter->isChecked())
282282
filter.append(srcFiles);
283283

284284
QMimeDatabase mimeDatabase;

0 commit comments

Comments
 (0)