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;
|
int indent= someColumn - 1;
|
||||||
if (indent == 0)
|
if (indent == 0)
|
||||||
return indentationLevel;
|
return indentationLevel;
|
||||||
if (tabChar == DefaultCodeFormatterOptions.TAB) {
|
if (tabChar == DefaultCodeFormatterOptions.TAB && !useTabsOnlyForLeadingIndents) {
|
||||||
if (useTabsOnlyForLeadingIndents) {
|
// Round up to a multiple of indentationSize.
|
||||||
return indent;
|
indent += indentationSize - 1;
|
||||||
}
|
return indent - indent % indentationSize;
|
||||||
int rem= indent % indentationSize;
|
|
||||||
int addition= rem == 0 ? 0 : indentationSize - rem; // round to superior
|
|
||||||
return indent + addition;
|
|
||||||
} else {
|
} else {
|
||||||
return indent;
|
return indent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue