Update kotlinter

Signed-off-by: Graham <gpe@openrs2.org>
Graham 2 years ago
parent d63af29679
commit c0056f9cb1
  1. 2
      .editorconfig
  2. 2
      archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt
  3. 2
      archive/src/main/kotlin/org/openrs2/archive/cache/OsrsJs5ChannelHandler.kt
  4. 4
      archive/src/main/kotlin/org/openrs2/archive/name/RuneStarNameDownloader.kt
  5. 12
      archive/src/main/kotlin/org/openrs2/archive/web/CachesController.kt
  6. 2
      asm/src/main/kotlin/org/openrs2/asm/packclass/PackClass.kt
  7. 140
      buffer/src/main/kotlin/org/openrs2/buffer/GeneratedByteBufExtensions.kt
  8. 2
      build.gradle.kts
  9. 2
      cache-550/src/main/kotlin/org/openrs2/cache/sprite/Sprite.kt
  10. 2
      cache/src/main/kotlin/org/openrs2/cache/Js5Index.kt
  11. 2
      cache/src/main/kotlin/org/openrs2/cache/Js5Pack.kt
  12. 2
      cache/src/main/kotlin/org/openrs2/cache/VersionList.kt
  13. 2
      cache/src/test/kotlin/org/openrs2/cache/Js5MasterIndexTest.kt
  14. 2
      compress/src/main/kotlin/org/openrs2/compress/bzip2/LibBzip2.kt
  15. 2
      conf/src/main/kotlin/org/openrs2/conf/CountryCode.kt
  16. 2
      game/src/main/kotlin/org/openrs2/game/net/login/LoginChannelHandler.kt
  17. 2
      game/src/main/kotlin/org/openrs2/game/store/PlayerStore.kt
  18. 2
      gradle/libs.versions.toml
  19. 8
      util/src/main/kotlin/org/openrs2/util/io/PathExtensions.kt

@ -15,7 +15,7 @@ indent_style = space
indent_size = 4
# see https://github.com/pinterest/ktlint/issues/764
# noinspection EditorConfigKeyCorrectness
disabled_rules = indent, parameter-list-wrapping
disabled_rules = argument-list-wrapping, parameter-list-wrapping, wrapping
[*.md]
max_line_length = 80

@ -50,7 +50,7 @@ public class CacheDownloader @Inject constructor(
buildMajor,
game.lastMasterIndexId,
continuation,
importer,
importer
)
)
}

@ -24,7 +24,7 @@ public class OsrsJs5ChannelHandler(
build: Int,
lastMasterIndexId: Int?,
continuation: Continuation<Unit>,
importer: CacheImporter,
importer: CacheImporter
) : Js5ChannelHandler(
bootstrap,
scopeId,

@ -51,11 +51,11 @@ public class RuneStarNameDownloader @Inject constructor(
private companion object {
private val NAMES_ENDPOINTS = listOf(
URI("https://raw.githubusercontent.com/RuneStar/cache-names/master/names.tsv"),
URI("https://raw.githubusercontent.com/Joshua-F/cache-names/master/names.tsv"),
URI("https://raw.githubusercontent.com/Joshua-F/cache-names/master/names.tsv")
)
private val INDIVIDUAL_NAMES_ENDPOINTS = listOf(
URI("https://raw.githubusercontent.com/RuneStar/cache-names/master/individual-names.tsv"),
URI("https://raw.githubusercontent.com/Joshua-F/cache-names/master/individual-names.tsv"),
URI("https://raw.githubusercontent.com/Joshua-F/cache-names/master/individual-names.tsv")
)
}
}

@ -58,9 +58,9 @@ public class CachesController @Inject constructor(
call.caching = CachingOptions(
cacheControl = CacheControl.MaxAge(
maxAgeSeconds = 900,
visibility = CacheControl.Visibility.Public,
visibility = CacheControl.Visibility.Public
),
expires = ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(900),
expires = ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(900)
)
call.respond(caches)
}
@ -83,7 +83,7 @@ public class CachesController @Inject constructor(
ThymeleafContent(
"caches/show.html", mapOf(
"cache" to cache,
"scope" to scope,
"scope" to scope
)
)
)
@ -113,12 +113,12 @@ public class CachesController @Inject constructor(
caching = CachingOptions(
cacheControl = CacheControl.MaxAge(
maxAgeSeconds = 86400,
visibility = CacheControl.Visibility.Public,
visibility = CacheControl.Visibility.Public
),
expires = ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(86400),
expires = ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(86400)
)
versions = listOf(
EntityTagVersion(etag, weak = false),
EntityTagVersion(etag, weak = false)
)
}
}

@ -42,7 +42,7 @@ public object PackClass {
Opcodes.V1_3,
Opcodes.V1_4,
Opcodes.V1_5,
Opcodes.V1_6,
Opcodes.V1_6
)
private const val INT_DESCRIPTOR = "I"

@ -446,7 +446,7 @@ public fun ByteBuf.getBytesA(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -467,7 +467,7 @@ public fun ByteBuf.getBytesA(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesA(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -480,7 +480,7 @@ public fun ByteBuf.getBytesA(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteA(index + i).toInt())
@ -496,7 +496,7 @@ public fun ByteBuf.readBytesA(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesA(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesA(index, dst, dstIndex, len)
@ -524,7 +524,7 @@ public fun ByteBuf.readBytesA(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesA(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesA(index, dst, dstIndex, len)
@ -551,7 +551,7 @@ public fun ByteBuf.setBytesA(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesA(index, buf, srcIndex, len)
@ -570,7 +570,7 @@ public fun ByteBuf.setBytesA(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesA(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesA(index, src, srcIndex, len)
@ -582,7 +582,7 @@ public fun ByteBuf.setBytesA(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteA(index + i, src.getByte(srcIndex + i).toInt())
@ -598,7 +598,7 @@ public fun ByteBuf.writeBytesA(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesA(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -625,7 +625,7 @@ public fun ByteBuf.writeBytesA(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesA(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -643,7 +643,7 @@ public fun ByteBuf.getBytesC(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -664,7 +664,7 @@ public fun ByteBuf.getBytesC(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesC(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -677,7 +677,7 @@ public fun ByteBuf.getBytesC(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteC(index + i).toInt())
@ -693,7 +693,7 @@ public fun ByteBuf.readBytesC(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesC(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesC(index, dst, dstIndex, len)
@ -721,7 +721,7 @@ public fun ByteBuf.readBytesC(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesC(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesC(index, dst, dstIndex, len)
@ -748,7 +748,7 @@ public fun ByteBuf.setBytesC(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesC(index, buf, srcIndex, len)
@ -767,7 +767,7 @@ public fun ByteBuf.setBytesC(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesC(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesC(index, src, srcIndex, len)
@ -779,7 +779,7 @@ public fun ByteBuf.setBytesC(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteC(index + i, src.getByte(srcIndex + i).toInt())
@ -795,7 +795,7 @@ public fun ByteBuf.writeBytesC(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesC(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -822,7 +822,7 @@ public fun ByteBuf.writeBytesC(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesC(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -840,7 +840,7 @@ public fun ByteBuf.getBytesS(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -861,7 +861,7 @@ public fun ByteBuf.getBytesS(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesS(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -874,7 +874,7 @@ public fun ByteBuf.getBytesS(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteS(index + i).toInt())
@ -890,7 +890,7 @@ public fun ByteBuf.readBytesS(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesS(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesS(index, dst, dstIndex, len)
@ -918,7 +918,7 @@ public fun ByteBuf.readBytesS(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesS(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesS(index, dst, dstIndex, len)
@ -945,7 +945,7 @@ public fun ByteBuf.setBytesS(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesS(index, buf, srcIndex, len)
@ -964,7 +964,7 @@ public fun ByteBuf.setBytesS(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesS(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesS(index, src, srcIndex, len)
@ -976,7 +976,7 @@ public fun ByteBuf.setBytesS(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteS(index + i, src.getByte(srcIndex + i).toInt())
@ -992,7 +992,7 @@ public fun ByteBuf.writeBytesS(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesS(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1019,7 +1019,7 @@ public fun ByteBuf.writeBytesS(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesS(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1037,7 +1037,7 @@ public fun ByteBuf.getBytesReverse(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -1059,7 +1059,7 @@ public fun ByteBuf.getBytesReverse(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesReverse(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -1072,7 +1072,7 @@ public fun ByteBuf.getBytesReverse(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByte(index + len - i - 1).toInt())
@ -1088,7 +1088,7 @@ public fun ByteBuf.readBytesReverse(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesReverse(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverse(index, dst, dstIndex, len)
@ -1116,7 +1116,7 @@ public fun ByteBuf.readBytesReverse(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesReverse(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverse(index, dst, dstIndex, len)
@ -1143,7 +1143,7 @@ public fun ByteBuf.setBytesReverse(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesReverse(index, buf, srcIndex, len)
@ -1162,7 +1162,7 @@ public fun ByteBuf.setBytesReverse(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesReverse(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesReverse(index, src, srcIndex, len)
@ -1174,7 +1174,7 @@ public fun ByteBuf.setBytesReverse(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByte(index + i, src.getByte(srcIndex + len - i - 1).toInt())
@ -1190,7 +1190,7 @@ public fun ByteBuf.writeBytesReverse(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesReverse(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1217,7 +1217,7 @@ public fun ByteBuf.writeBytesReverse(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesReverse(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1235,7 +1235,7 @@ public fun ByteBuf.getBytesReverseA(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -1257,7 +1257,7 @@ public fun ByteBuf.getBytesReverseA(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesReverseA(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -1270,7 +1270,7 @@ public fun ByteBuf.getBytesReverseA(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteA(index + len - i - 1).toInt())
@ -1286,7 +1286,7 @@ public fun ByteBuf.readBytesReverseA(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesReverseA(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseA(index, dst, dstIndex, len)
@ -1314,7 +1314,7 @@ public fun ByteBuf.readBytesReverseA(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesReverseA(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseA(index, dst, dstIndex, len)
@ -1341,7 +1341,7 @@ public fun ByteBuf.setBytesReverseA(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesReverseA(index, buf, srcIndex, len)
@ -1360,7 +1360,7 @@ public fun ByteBuf.setBytesReverseA(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesReverseA(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesReverseA(index, src, srcIndex, len)
@ -1372,7 +1372,7 @@ public fun ByteBuf.setBytesReverseA(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteA(index + i, src.getByte(srcIndex + len - i - 1).toInt())
@ -1388,7 +1388,7 @@ public fun ByteBuf.writeBytesReverseA(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesReverseA(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1415,7 +1415,7 @@ public fun ByteBuf.writeBytesReverseA(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesReverseA(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1433,7 +1433,7 @@ public fun ByteBuf.getBytesReverseC(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -1455,7 +1455,7 @@ public fun ByteBuf.getBytesReverseC(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesReverseC(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -1468,7 +1468,7 @@ public fun ByteBuf.getBytesReverseC(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteC(index + len - i - 1).toInt())
@ -1484,7 +1484,7 @@ public fun ByteBuf.readBytesReverseC(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesReverseC(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseC(index, dst, dstIndex, len)
@ -1512,7 +1512,7 @@ public fun ByteBuf.readBytesReverseC(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesReverseC(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseC(index, dst, dstIndex, len)
@ -1539,7 +1539,7 @@ public fun ByteBuf.setBytesReverseC(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesReverseC(index, buf, srcIndex, len)
@ -1558,7 +1558,7 @@ public fun ByteBuf.setBytesReverseC(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesReverseC(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesReverseC(index, src, srcIndex, len)
@ -1570,7 +1570,7 @@ public fun ByteBuf.setBytesReverseC(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteC(index + i, src.getByte(srcIndex + len - i - 1).toInt())
@ -1586,7 +1586,7 @@ public fun ByteBuf.writeBytesReverseC(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesReverseC(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1613,7 +1613,7 @@ public fun ByteBuf.writeBytesReverseC(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesReverseC(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1631,7 +1631,7 @@ public fun ByteBuf.getBytesReverseS(
index: Int,
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
getBytes(index, dst, dstIndex, len)
for (i in 0 until len) {
@ -1653,7 +1653,7 @@ public fun ByteBuf.getBytesReverseS(index: Int, dst: ByteBuf): ByteBuf {
public fun ByteBuf.getBytesReverseS(
index: Int,
dst: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val dstIndex = dst.writerIndex()
dst.ensureWritable(len)
@ -1666,7 +1666,7 @@ public fun ByteBuf.getBytesReverseS(
index: Int,
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
dst.setByte(dstIndex + i, getByteS(index + len - i - 1).toInt())
@ -1682,7 +1682,7 @@ public fun ByteBuf.readBytesReverseS(dst: ByteArray): ByteBuf {
public fun ByteBuf.readBytesReverseS(
dst: ByteArray,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseS(index, dst, dstIndex, len)
@ -1710,7 +1710,7 @@ public fun ByteBuf.readBytesReverseS(dst: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.readBytesReverseS(
dst: ByteBuf,
dstIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = readerIndex()
getBytesReverseS(index, dst, dstIndex, len)
@ -1737,7 +1737,7 @@ public fun ByteBuf.setBytesReverseS(
index: Int,
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
Unpooled.wrappedBuffer(src).use { buf ->
setBytesReverseS(index, buf, srcIndex, len)
@ -1756,7 +1756,7 @@ public fun ByteBuf.setBytesReverseS(index: Int, src: ByteBuf): ByteBuf {
public fun ByteBuf.setBytesReverseS(
index: Int,
src: ByteBuf,
len: Int,
len: Int
): ByteBuf {
val srcIndex = src.readerIndex()
setBytesReverseS(index, src, srcIndex, len)
@ -1768,7 +1768,7 @@ public fun ByteBuf.setBytesReverseS(
index: Int,
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
for (i in 0 until len) {
setByteS(index + i, src.getByte(srcIndex + len - i - 1).toInt())
@ -1784,7 +1784,7 @@ public fun ByteBuf.writeBytesReverseS(src: ByteArray): ByteBuf {
public fun ByteBuf.writeBytesReverseS(
src: ByteArray,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)
@ -1811,7 +1811,7 @@ public fun ByteBuf.writeBytesReverseS(src: ByteBuf, len: Int): ByteBuf {
public fun ByteBuf.writeBytesReverseS(
src: ByteBuf,
srcIndex: Int,
len: Int,
len: Int
): ByteBuf {
val index = writerIndex()
ensureWritable(len)

@ -53,7 +53,7 @@ allprojects {
plugins.withType<KotlinterPlugin> {
configure<KotlinterExtension> {
// see https://github.com/pinterest/ktlint/issues/764
disabledRules = arrayOf("indent", "parameter-list-wrapping")
disabledRules = arrayOf("argument-list-wrapping", "parameter-list-wrapping", "wrapping")
}
}

@ -14,7 +14,7 @@ public class Sprite private constructor(
val xOffset: Int,
val yOffset: Int,
val innerWidth: Int,
val innerHeight: Int,
val innerHeight: Int
) {
val pixels = ByteArray(innerWidth * innerHeight)
var alpha: ByteArray? = null

@ -102,7 +102,7 @@ public class Js5Index(
public class MutableFile internal constructor(
parent: MutableNamedEntryCollection<MutableFile>,
override val id: Int,
override val id: Int
) : MutableNamedEntry, File {
private var parent: MutableNamedEntryCollection<MutableFile>? = parent

@ -23,7 +23,7 @@ public class Js5Pack private constructor(
index: Js5Index,
unpackedCacheSize: Int,
private var packedIndex: ByteBuf,
private val packed: Int2ObjectSortedMap<ByteBuf>,
private val packed: Int2ObjectSortedMap<ByteBuf>
) : Archive(alloc, index, 0, UnpackedCache(unpackedCacheSize)), Closeable {
override fun packedExists(group: Int): Boolean {
return packed.containsKey(group)

@ -4,7 +4,7 @@ import org.openrs2.buffer.use
public class VersionList(
public val files: List<List<File>>,
public val maps: Map<Int, MapSquare>,
public val maps: Map<Int, MapSquare>
) {
public data class File(
val version: Int,

@ -28,7 +28,7 @@ class Js5MasterIndexTest {
"0e1a2b93c80a41c7ad2a985dff707a6a8ff82e229cbc468f04191198920955a1" +
"4b3d7eab77a17faf99208dee5b44afb789962ad79f230b3b59106a0af892219c"
)
),
)
)
), index
)

@ -56,7 +56,7 @@ public interface LibBzip2 {
public fun load(): LibBzip2 {
return LibraryLoader.loadLibrary(
LibBzip2::class.java, mapOf(
LibraryOption.LoadNow to true,
LibraryOption.LoadNow to true
), "bz2"
)
}

@ -245,5 +245,5 @@ public enum class CountryCode {
EH, // Western Sahara
YE, // Yemen
ZM, // Zambia
ZW, // Zimbabwe
ZW // Zimbabwe
}

@ -209,7 +209,7 @@ public class LoginChannelHandler @Inject constructor(
msg.affiliate,
dateOfBirth,
country,
msg.email,
msg.email
).bind()
}.getErrorOr(CreateResponse.Ok)

@ -16,6 +16,6 @@ public interface PlayerStore {
affiliate: Int,
dateOfBirth: LocalDate,
country: CountryCode,
email: String,
email: String
): Result<Unit, CreateResponse>
}

@ -15,7 +15,7 @@ nettyIoUring = "0.0.15.Final"
[plugins]
dependencyLicenseReport = { id = "com.github.jk1.dependency-license-report", version = "2.1" }
dokka = { id = "org.jetbrains.dokka", version = "1.7.10" }
kotlinter = { id = "org.jmailen.kotlinter", version = "3.9.0" }
kotlinter = { id = "org.jmailen.kotlinter", version = "3.12.0" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
versions = { id = "com.github.ben-manes.versions", version = "0.42.0" }

@ -109,7 +109,7 @@ public inline fun <T> Path.useTempFile(
public inline fun <T> Path.atomicWrite(
sync: Boolean = true,
f: (Path) -> T,
f: (Path) -> T
): T {
parent.useTempFile(".$fileName", ".tmp") { tempFile ->
val result = f(tempFile)
@ -134,7 +134,7 @@ public inline fun <T> Path.atomicWrite(
public inline fun <T> Path.useAtomicBufferedWriter(
vararg options: OpenOption,
sync: Boolean = true,
f: (BufferedWriter) -> T,
f: (BufferedWriter) -> T
): T {
return atomicWrite(sync) { path ->
Files.newBufferedWriter(path, *options).use { writer ->
@ -147,7 +147,7 @@ public inline fun <T> Path.useAtomicBufferedWriter(
cs: Charset,
vararg options: OpenOption,
sync: Boolean = true,
f: (BufferedWriter) -> T,
f: (BufferedWriter) -> T
): T {
return atomicWrite(sync) { path ->
Files.newBufferedWriter(path, cs, *options).use { writer ->
@ -159,7 +159,7 @@ public inline fun <T> Path.useAtomicBufferedWriter(
public inline fun <T> Path.useAtomicOutputStream(
vararg options: OpenOption,
sync: Boolean = true,
f: (OutputStream) -> T,
f: (OutputStream) -> T
): T {
return atomicWrite(sync) { path ->
Files.newOutputStream(path, *options).use { output ->

Loading…
Cancel
Save