Commit c854be95 authored by Him188's avatar Him188

Adjust visibility

parent 56728378
...@@ -18,8 +18,7 @@ import kotlin.jvm.JvmName ...@@ -18,8 +18,7 @@ import kotlin.jvm.JvmName
/** /**
* 要求 [this] 最小为 [min]. * 要求 [this] 最小为 [min].
*/ */
@Suppress("NOTHING_TO_INLINE") internal fun Int.coerceAtLeastOrFail(min: Int): Int {
inline fun Int.coerceAtLeastOrFail(min: Int): Int {
require(this >= min) require(this >= min)
return this return this
} }
...@@ -27,8 +26,7 @@ inline fun Int.coerceAtLeastOrFail(min: Int): Int { ...@@ -27,8 +26,7 @@ inline fun Int.coerceAtLeastOrFail(min: Int): Int {
/** /**
* 要求 [this] 最小为 [min]. * 要求 [this] 最小为 [min].
*/ */
@Suppress("NOTHING_TO_INLINE") internal fun Long.coerceAtLeastOrFail(min: Long): Long {
inline fun Long.coerceAtLeastOrFail(min: Long): Long {
require(this >= min) require(this >= min)
return this return this
} }
...@@ -36,12 +34,10 @@ inline fun Long.coerceAtLeastOrFail(min: Long): Long { ...@@ -36,12 +34,10 @@ inline fun Long.coerceAtLeastOrFail(min: Long): Long {
/** /**
* 要求 [this] 最大为 [max]. * 要求 [this] 最大为 [max].
*/ */
@Suppress("NOTHING_TO_INLINE") internal fun Int.coerceAtMostOrFail(max: Int): Int =
inline fun Int.coerceAtMostOrFail(max: Int): Int =
if (this >= max) error("value is greater than its expected maximum value $max") if (this >= max) error("value is greater than its expected maximum value $max")
else this else this
@Suppress("NOTHING_TO_INLINE") internal fun Long.coerceAtMostOrFail(max: Long): Long =
inline fun Long.coerceAtMostOrFail(max: Long): Long =
if (this >= max) error("value is greater than its expected maximum value $max") if (this >= max) error("value is greater than its expected maximum value $max")
else this else this
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment