MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / isOkToBreakBlock

Method isOkToBreakBlock

astyle/src/ASFormatter.cpp:4514–4527  ·  view source on GitHub ↗

* is it ok to break this block? */

Source from the content-addressed store, hash-verified

4512* is it ok to break this block?
4513*/
4514bool ASFormatter::isOkToBreakBlock(BracketType bracketType) const
4515{
4516 // Actually, there should not be an ARRAY_TYPE bracket here.
4517 // But this will avoid breaking a one line block when there is.
4518 // Otherwise they will be formatted differently on consecutive runs.
4519 if (isBracketType(bracketType, ARRAY_TYPE)
4520 && isBracketType(bracketType, SINGLE_LINE_TYPE))
4521 return false;
4522 if (!isBracketType(bracketType, SINGLE_LINE_TYPE)
4523 || shouldBreakOneLineBlocks
4524 || breakCurrentOneLineBlock)
4525 return true;
4526 return false;
4527}
4528
4529/**
4530* check if a sharp header is a paren or nonparen header

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected