Missed a line from the previous change. Added comment for new ArrayUtil method
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5498 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -228,6 +228,14 @@ public class ArrayUtil
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy a segment of one array to another.
|
||||||
|
* @param src the array to copy from
|
||||||
|
* @param srcoffset the position in the source array to begin copying from
|
||||||
|
* @param dst the array to copy into
|
||||||
|
* @param dstoffset the position in the destition array to begin copying into
|
||||||
|
* @param count the number of elements to copy
|
||||||
|
*/
|
||||||
public static function copy (
|
public static function copy (
|
||||||
src :Array, srcoffset :uint, dst :Array, dstoffset :uint, count :uint) :void
|
src :Array, srcoffset :uint, dst :Array, dstoffset :uint, count :uint) :void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class Throttle
|
|||||||
// copy to a larger buffer, leaving zeroes at the beginning
|
// copy to a larger buffer, leaving zeroes at the beginning
|
||||||
oldestOp = _oldestOp + operations - _ops.length;
|
oldestOp = _oldestOp + operations - _ops.length;
|
||||||
ArrayUtil.copy(_ops, 0, ops, 0, _oldestOp);
|
ArrayUtil.copy(_ops, 0, ops, 0, _oldestOp);
|
||||||
|
ArrayUtil.copy(_ops, _oldestOp, ops, oldestOp, _ops.length - _oldestOp);
|
||||||
|
|
||||||
} else if (operations < _ops.length) {
|
} else if (operations < _ops.length) {
|
||||||
// copy to a smaller buffer, truncating older operations
|
// copy to a smaller buffer, truncating older operations
|
||||||
|
|||||||
Reference in New Issue
Block a user