Avoid ISUB in kotlin.repeat
This commit is contained in:
committed by
Ilya Gorbunov
parent
ab615b7d70
commit
9ffd0db4a8
@@ -82,7 +82,7 @@ public inline fun <T> T.takeUnless(predicate: (T) -> Boolean): T? = if (!predica
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun repeat(times: Int, action: (Int) -> Unit) {
|
public inline fun repeat(times: Int, action: (Int) -> Unit) {
|
||||||
for (index in 0..times - 1) {
|
for (index in 0 until times) {
|
||||||
action(index)
|
action(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user