소스 검색

Suppress false positive warnings

Him188 6 년 전
부모
커밋
5310e19861
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt

+ 1 - 0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt

@@ -46,6 +46,7 @@ expect fun localIpAddress(): String
  */
 expect val Http: HttpClient
 
+@Suppress("DuplicatedCode") // false positive. `this` is not the same for `List<Byte>` and `ByteArray`
 internal fun ByteArray.checkOffsetAndLength(offset: Int, length: Int) {
     require(offset >= 0) { "offset shouldn't be negative: $offset" }
     require(length >= 0) { "length shouldn't be negative: $length" }