[Pydev-cvs] org.python.pydev.core/src/org/python/pydev/core/structure FastStringBuffer.java, 1.1,
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-15 12:44:16
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/structure In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7244/src/org/python/pydev/core/structure Modified Files: FastStringBuffer.java Log Message: Minor Index: FastStringBuffer.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/structure/FastStringBuffer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FastStringBuffer.java 14 Jun 2008 22:14:27 -0000 1.1 --- FastStringBuffer.java 15 Jun 2008 12:44:22 -0000 1.2 *************** *** 52,61 **** public FastStringBuffer append(String string) { int strLen = string.length(); ! if (this.count + strLen > this.value.length) { ! resizeForMinimum(this.count + strLen); } string.getChars(0, strLen, value, this.count); ! this.count += strLen; return this; --- 52,62 ---- public FastStringBuffer append(String string) { int strLen = string.length(); + int newCount = count + strLen; ! if (newCount > this.value.length) { ! resizeForMinimum(newCount); } string.getChars(0, strLen, value, this.count); ! this.count = newCount; return this; *************** *** 84,88 **** } value[count] = n; ! count += 1; return this; } --- 85,89 ---- } value[count] = n; ! count ++; return this; } *************** *** 99,107 **** public FastStringBuffer append(char[] chars) { ! if (count + chars.length > value.length) { ! resizeForMinimum(count + chars.length); } System.arraycopy(chars, 0, value, count, chars.length); ! count += chars.length; return this; } --- 100,109 ---- public FastStringBuffer append(char[] chars) { ! int newCount = count + chars.length; ! if (newCount > value.length) { ! resizeForMinimum(newCount); } System.arraycopy(chars, 0, value, count, chars.length); ! count = newCount; return this; } *************** *** 146,150 **** public void deleteLast() { if (this.count > 0) { ! this.count -= 1; } } --- 148,152 ---- public void deleteLast() { if (this.count > 0) { ! this.count--; } } |