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

Fix for 206829: Can't create a newline in some cpp files

This commit is contained in:
Anton Leherbauer 2007-10-23 11:31:30 +00:00
parent 57d7ac7888
commit f9aaf04e88

View file

@ -664,15 +664,9 @@ public final class CIndenter {
if (CCorePlugin.SPACE.equals(fPrefs.prefTabChar)) {
tabs= 0;
spaces= missing;
} else if (CCorePlugin.TAB.equals(fPrefs.prefTabChar)) {
tabs= tabSize > 0 ? missing / tabSize : 0;
spaces= tabSize > 0 ? missing % tabSize : missing;
} else if (DefaultCodeFormatterConstants.MIXED.equals(fPrefs.prefTabChar)) {
tabs= tabSize > 0 ? missing / tabSize : 0;
spaces= tabSize > 0 ? missing % tabSize : missing;
} else {
Assert.isTrue(false);
return null;
tabs= tabSize > 0 ? missing / tabSize : 0;
spaces= tabSize > 0 ? missing % tabSize : missing;
}
for (int i= 0; i < tabs; i++)
buffer.append('\t');
@ -1408,6 +1402,7 @@ public final class CIndenter {
return false;
default:
// programming error
Assert.isTrue(false);
return false;
}
@ -1538,6 +1533,7 @@ public final class CIndenter {
return pos; // restore
default:
// programming error
Assert.isTrue(false);
return -1; // dummy
}