Skip to content

Commit b98b2ee

Browse files
committed
Fix warnings.
1 parent 8aec163 commit b98b2ee

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

jvm/selfie-lib/src/jsMain/kotlin/com/diffplug/selfie/guts/AtomicFuBroken.js.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 DiffPlug
2+
* Copyright (C) 2024-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,12 +29,7 @@ actual class AtomicRef<T>(private var value: T) {
2929
}
3030
}
3131
val Lock = ReentrantLock()
32-
actual inline fun reentrantLock() = Lock
32+
actual fun reentrantLock() = Lock
3333

34-
@Suppress("NOTHING_TO_INLINE")
35-
actual class ReentrantLock {
36-
actual inline fun lock(): Unit {}
37-
actual inline fun tryLock() = true
38-
actual inline fun unlock(): Unit {}
39-
}
34+
@Suppress("NOTHING_TO_INLINE") actual class ReentrantLock
4035
actual inline fun <T> ReentrantLock.withLock(block: () -> T) = block()

jvm/selfie-lib/src/jvmMain/kotlin/com/diffplug/selfie/guts/AtomicFuBroken.jvm.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 DiffPlug
2+
* Copyright (C) 2024-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ actual class AtomicRef<T>(value: T) {
2424
actual fun updateAndGet(update: (T) -> T): T = ref.updateAndGet(update)
2525
actual fun getAndUpdate(update: (T) -> T) = ref.getAndUpdate(update)
2626
}
27-
actual inline fun reentrantLock() = ReentrantLock()
27+
actual fun reentrantLock() = ReentrantLock()
2828

2929
actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
3030
actual inline fun <T> ReentrantLock.withLock(block: () -> T): T {

0 commit comments

Comments
 (0)