@@ -30,7 +30,6 @@ import okio.decodeBase64ToArray
3030import okio.encodeBase64
3131import okio.isIsoControl
3232import okio.processUtf8CodePoints
33- import okio.resolveDefaultParameter
3433import okio.shr
3534import okio.toUtf8String
3635
@@ -126,7 +125,6 @@ internal inline fun ByteString.commonToAsciiUppercase(): ByteString {
126125
127126@Suppress(" NOTHING_TO_INLINE" )
128127internal inline fun ByteString.commonSubstring (beginIndex : Int , endIndex : Int ): ByteString {
129- val endIndex = resolveDefaultParameter(endIndex)
130128 require(beginIndex >= 0 ) { " beginIndex < 0" }
131129 require(endIndex <= data.size) { " endIndex > length(${data.size} )" }
132130
@@ -218,7 +216,6 @@ internal inline fun ByteString.commonLastIndexOf(
218216
219217@Suppress(" NOTHING_TO_INLINE" )
220218internal inline fun ByteString.commonLastIndexOf (other : ByteArray , fromIndex : Int ): Int {
221- val fromIndex = resolveDefaultParameter(fromIndex)
222219 val limit = data.size - other.size
223220 for (i in minOf(fromIndex, limit) downTo 0 ) {
224221 if (arrayRangeEquals(data, i, other, 0 , other.size)) {
@@ -270,7 +267,6 @@ internal inline fun commonOf(data: ByteArray) = ByteString(data.copyOf())
270267
271268@Suppress(" NOTHING_TO_INLINE" )
272269internal inline fun ByteArray.commonToByteString (offset : Int , byteCount : Int ): ByteString {
273- val byteCount = resolveDefaultParameter(byteCount)
274270 checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong())
275271 return ByteString (copyOfRange(offset, offset + byteCount))
276272}
0 commit comments