* Get the array use for loop. * @returns The array use for loop
()
| 71 | * @returns The array use for loop |
| 72 | */ |
| 73 | getLoopArray(): ReadonlyArray<T> { |
| 74 | const loopArray = this._loopArray; |
| 75 | if (this._loopArrayDirty) { |
| 76 | const array = this._array; |
| 77 | const count = array.length; |
| 78 | loopArray.length = count; |
| 79 | for (let i = 0; i < count; i++) { |
| 80 | loopArray[i] = array[i]; |
| 81 | } |
| 82 | this._loopArrayDirty = false; |
| 83 | } |
| 84 | return loopArray; |
| 85 | } |
| 86 | } |
no outgoing calls
no test coverage detected