Codereview
This commit is contained in:
committed by
Space Team
parent
78b72efd32
commit
c71a2c6dd3
@@ -86,8 +86,8 @@ internal fun <T> arrayIterator(array: Array<T>) = object : Iterator<T> {
|
||||
override fun next() = if (index != array.size) array[index++] else throw NoSuchElementException("$index")
|
||||
}
|
||||
|
||||
internal inline fun <reified T> createAnyArray(size: Int, invokable: (Int) -> T): Array<T> {
|
||||
internal inline fun <reified T> createAnyArray(size: Int, init: (Int) -> T): Array<T> {
|
||||
val result = WasmAnyArray(size)
|
||||
result.fill(size, invokable)
|
||||
result.fill(size, init)
|
||||
return Array(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user