From 0f73afc49266081e7f3eb9cc5506fbadad3e8c17 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 15 Apr 2009 20:25:26 +0000 Subject: [PATCH] This class is remarkably pointless. We could trash it and change our toStringBuf() methods to just return a String. I guess. Then the caller would have to assign the string somewhere. I guess this has some value. So anyway: Occam's razor, and fixes a small bug: appending undefined would print as "null" since it was being forced to an Object first. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5722 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/StringBuilder.as | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/as/com/threerings/util/StringBuilder.as b/src/as/com/threerings/util/StringBuilder.as index 37f0ff3c6..60855bf66 100644 --- a/src/as/com/threerings/util/StringBuilder.as +++ b/src/as/com/threerings/util/StringBuilder.as @@ -34,9 +34,7 @@ public class StringBuilder */ public function append (... args) :StringBuilder { - for each (var o :Object in args) { - _buf += String(o); - } + _buf += args.join(""); return this; }