Codereview

This commit is contained in:
Igor Yakovlev
2023-05-20 13:03:21 +02:00
committed by Space Team
parent 78b72efd32
commit c71a2c6dd3
4 changed files with 30 additions and 29 deletions
@@ -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)
}