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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user