[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: optimised GdkFontPeer buildString
Kaffe CVS
cvs-commits at kaffe.org
Tue Nov 23 19:44:50 PST 2004
PatchSet 5475
Date: 2004/11/24 03:40:21
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: optimised GdkFontPeer buildString
2004-11-24 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:
Resynced with GNU Classpath.
2004-11-16 Michael Koch <konqueror at gmx.de>
* gnu/java/awt/peer/gtk/GdkFontPeer.java
(buildString): Optimise String building.
Members:
ChangeLog:1.3021->1.3022
libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3021 kaffe/ChangeLog:1.3022
--- kaffe/ChangeLog:1.3021 Wed Nov 24 03:32:25 2004
+++ kaffe/ChangeLog Wed Nov 24 03:40:21 2004
@@ -1,5 +1,15 @@
2004-11-24 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:
+ Resynced with GNU Classpath.
+
+ 2004-11-16 Michael Koch <konqueror at gmx.de>
+
+ * gnu/java/awt/peer/gtk/GdkFontPeer.java
+ (buildString): Optimise String building.
+
+2004-11-24 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/gnu/java/beans/BeanInfoEmbryo.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java
diff -u kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:1.2 kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:1.3
--- kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java:1.2 Thu Oct 28 22:34:22 2004
+++ kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GdkFontPeer.java Wed Nov 24 03:40:23 2004
@@ -95,31 +95,31 @@
* triplicate.
*/
- private String buildString(CharacterIterator i) {
- String s = new String ();
- for(char c = i.first(); c != CharacterIterator.DONE; c = i.next())
- s += c;
- return s;
+ private String buildString(CharacterIterator iter)
+ {
+ StringBuffer sb = new StringBuffer();
+ for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next())
+ sb.append(c);
+ return sb.toString();
}
- private String buildString(CharacterIterator iter, int begin, int limit) {
- String s = new String ();
+ private String buildString(CharacterIterator iter, int begin, int limit)
+ {
+ StringBuffer sb = new StringBuffer();
int i = 0;
for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next(), i++)
{
if (begin <= i)
- s += c;
+ sb.append(c);
if (limit <= i)
break;
}
- return s;
+ return sb.toString();
}
- private String buildString(char[] chars, int begin, int limit) {
- String s = new String ();
- for(int i = begin; i <= limit; i++)
- s += chars[i];
- return s;
+ private String buildString(char[] chars, int begin, int limit)
+ {
+ return new String(chars, begin, limit - begin);
}
/* Public API */
More information about the kaffe
mailing list