Cleanup appendHolders.

This commit is contained in:
John-David Dalton
2014-07-21 08:50:35 -07:00
parent 390cf2114a
commit 2cf17b19dc

View File

@@ -1058,24 +1058,23 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
/** /**
* Appends `otherHolders` placeholders to `holders` placeholders offseting * Appends placeholder indexes to `array` adding `offset` to each appended index.
* `otherHolders` by `offset`.
* *
* @private * @private
* @param {Array} holders The placeholders augment. * @param {Array} array The array of placeholder indexes to append to.
* @param {Array} otherHolders The placeholders to append. * @param {Array} indexes The array of placeholder indexes to append.
* @param {number} offset The placeholder offset. * @param {number} offset The placeholder offset.
* @returns {Array} Returns `holders`. * @returns {Array} Returns `array`.
*/ */
function appendHolders(holders, otherHolders, offset) { function appendHolders(array, indexes, offset) {
var length = holders.length, var length = array.length,
index = otherHolders.length; index = indexes.length;
holders.length += index; array.length += index;
while (index--) { while (index--) {
holders[length + index] = offset + otherHolders[index]; array[length + index] = indexes[index] + offset;
} }
return holders; return array;
} }
/** /**