Ye olde razor. Now that I know abjectscript like the back of my hand,

reviewing some of the first code written in it might be a good idea.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5741 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-04-23 00:23:34 +00:00
parent c754d42f5b
commit bfcb45434e
+2 -6
View File
@@ -80,9 +80,7 @@ public dynamic class TypedArray extends Array
*/ */
public function addAll (other :Array) :TypedArray public function addAll (other :Array) :TypedArray
{ {
for (var ii :int = 0; ii < other.length; ii++) { push.apply(this, other);
push(other[ii]);
}
return this; return this;
} }
@@ -96,9 +94,7 @@ public dynamic class TypedArray extends Array
{ {
var clazz :Class = ClassUtil.getClass(this); var clazz :Class = ClassUtil.getClass(this);
var copy :TypedArray = new clazz(_jtype); var copy :TypedArray = new clazz(_jtype);
for (var ii :int = length - 1; ii >= 0; ii--) { copy.addAll(this);
copy[ii] = this[ii];
}
return copy; return copy;
} }