Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Suspicious code in CodeFormatterVisitor.java

CodeFormatterVisitor.formatStatements method contains two 'if' statements with a strange condition:

if ((previousStatementIsNullStmt && !statementIsNullStmt)
        || (!previousStatementIsNullStmt && !statementIsNullStmt)) {
    scribe.startNewLine();
}

As it currently stands, the condition can be reduced to just !statementIsNullStmt, but something else was probably intended. Toni, do you remember the original intension?

-sergey


Back to the top