mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Code streamlining.
This commit is contained in:
parent
270544ee2e
commit
253c5f1f03
1 changed files with 2 additions and 5 deletions
|
@ -3428,7 +3428,6 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
|||
} catch (ASTProblemException e) {
|
||||
skipToNode(statements.get(1));
|
||||
}
|
||||
final boolean previousStatementIsNullStmt= previousStatement instanceof IASTNullStatement;
|
||||
final int indentLevel= scribe.indentationLevel;
|
||||
for (int i = 1; i < statementsLength - 1; i++) {
|
||||
final IASTStatement statement= statements.get(i);
|
||||
|
@ -3436,8 +3435,7 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
|||
continue;
|
||||
}
|
||||
final boolean statementIsNullStmt= statement instanceof IASTNullStatement;
|
||||
if ((previousStatementIsNullStmt && !statementIsNullStmt)
|
||||
|| (!previousStatementIsNullStmt && !statementIsNullStmt)) {
|
||||
if (!statementIsNullStmt) {
|
||||
scribe.startNewLine();
|
||||
}
|
||||
try {
|
||||
|
@ -3459,8 +3457,7 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
|||
}
|
||||
final IASTStatement statement= statements.get(statementsLength - 1);
|
||||
final boolean statementIsNullStmt= statement instanceof IASTNullStatement;
|
||||
if ((previousStatementIsNullStmt && !statementIsNullStmt)
|
||||
|| (!previousStatementIsNullStmt && !statementIsNullStmt)) {
|
||||
if (!statementIsNullStmt) {
|
||||
scribe.startNewLine();
|
||||
}
|
||||
statement.accept(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue