1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Code simplification.

This commit is contained in:
Sergey Prigogin 2011-03-26 19:44:24 +00:00
parent 60b01f39f3
commit a840d359aa

View file

@ -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;
}