calculate less indent buffers

This commit is contained in:
Egor.Ushakov
2014-10-07 21:03:09 +04:00
parent 125441a88f
commit 9bd8af2b43
4 changed files with 48 additions and 53 deletions

View File

@@ -92,17 +92,12 @@ public class InterpreterUtil {
public static String getIndentString(int length) {
if (length == 0) return "";
TextBuffer buf = new TextBuffer();
appendIndent(buf, length);
return buf.toString();
}
public static void appendIndent(TextBuffer buffer, int length) {
if (length == 0) return;
StringBuilder buf = new StringBuilder();
String indent = (String)DecompilerContext.getProperty(IFernflowerPreferences.INDENT_STRING);
while (length-- > 0) {
buffer.append(indent);
buf.append(indent);
}
return buf.toString();
}
public static boolean equalSets(Collection<?> c1, Collection<?> c2) {