Skip to content

Commit 9a03670

Browse files
committed
Remove unnecessary inline modifiers
1 parent 5c33b8d commit 9a03670

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kotlinx-coroutines-core/common/src/internal/SegmentList.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ internal abstract class Segment<S : Segment<S>>(val id: Long, prev: S?, pointers
9494
fun trySetNext(value: S): Boolean = _next.compareAndSet(null, value)
9595

9696
// Pointer to the previous segment, updates in [remove] function.
97-
val prev = atomic(prev)
97+
internal val prev = atomic(prev)
9898

9999
/**
100100
* Cleans the pointer to the previous segment.
101101
*/
102-
fun cleanPrev() = prev.lazySet(null)
102+
fun cleanPrev() { prev.lazySet(null) }
103103

104104
/**
105105
* This property should return the maximal number of slots in this segment,
@@ -116,13 +116,13 @@ internal abstract class Segment<S : Segment<S>>(val id: Long, prev: S?, pointers
116116
* there is no pointers to this segment from outside, and
117117
* it is not a physical tail in the linked list of segments.
118118
*/
119-
inline val removed get() = cleanedAndPointers.value == maxSlots && _next.value !== null
119+
val removed get() = cleanedAndPointers.value == maxSlots && _next.value !== null
120120

121121
// increments the number of pointers if this segment is not logically removed\
122-
inline fun tryIncPointers() = cleanedAndPointers.addConditionally(1 shl POINTERS_SHIFT) { it != maxSlots }
122+
fun tryIncPointers() = cleanedAndPointers.addConditionally(1 shl POINTERS_SHIFT) { it != maxSlots }
123123

124124
// returns `true` if this segment is logically removed after the decrement
125-
inline fun decPointers() = cleanedAndPointers.addAndGet(-(1 shl POINTERS_SHIFT)) == maxSlots
125+
fun decPointers() = cleanedAndPointers.addAndGet(-(1 shl POINTERS_SHIFT)) == maxSlots
126126

127127
/**
128128
* This functions should be invoked on each slot clean-up;

0 commit comments

Comments
 (0)