Stdlib: do not check radix twice in Byte/Short.toString

`checkRadix` is already called in `Int.toString`.
This commit is contained in:
Alexander Udalov
2023-07-28 18:58:00 +02:00
committed by Space Team
parent a064db8da6
commit cceb138c6c
@@ -16,7 +16,7 @@ package kotlin.text
*/ */
@SinceKotlin("1.1") @SinceKotlin("1.1")
@kotlin.internal.InlineOnly @kotlin.internal.InlineOnly
public actual inline fun Byte.toString(radix: Int): String = this.toInt().toString(checkRadix(radix)) public actual inline fun Byte.toString(radix: Int): String = this.toInt().toString(radix)
/** /**
* Returns a string representation of this [Short] value in the specified [radix]. * Returns a string representation of this [Short] value in the specified [radix].
@@ -25,7 +25,7 @@ public actual inline fun Byte.toString(radix: Int): String = this.toInt().toStri
*/ */
@SinceKotlin("1.1") @SinceKotlin("1.1")
@kotlin.internal.InlineOnly @kotlin.internal.InlineOnly
public actual inline fun Short.toString(radix: Int): String = this.toInt().toString(checkRadix(radix)) public actual inline fun Short.toString(radix: Int): String = this.toInt().toString(radix)
/** /**
* Returns a string representation of this [Int] value in the specified [radix]. * Returns a string representation of this [Int] value in the specified [radix].