mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code simplification.
This commit is contained in:
parent
60b01f39f3
commit
a840d359aa
1 changed files with 4 additions and 7 deletions
|
@ -514,13 +514,10 @@ public class Scribe {
|
|||
int indent= someColumn - 1;
|
||||
if (indent == 0)
|
||||
return indentationLevel;
|
||||
if (tabChar == DefaultCodeFormatterOptions.TAB) {
|
||||
if (useTabsOnlyForLeadingIndents) {
|
||||
return indent;
|
||||
}
|
||||
int rem= indent % indentationSize;
|
||||
int addition= rem == 0 ? 0 : indentationSize - rem; // round to superior
|
||||
return indent + addition;
|
||||
if (tabChar == DefaultCodeFormatterOptions.TAB && !useTabsOnlyForLeadingIndents) {
|
||||
// Round up to a multiple of indentationSize.
|
||||
indent += indentationSize - 1;
|
||||
return indent - indent % indentationSize;
|
||||
} else {
|
||||
return indent;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue