Skip to content

Commit

Permalink
ktlint fixes for 0.50.0. (#2050)
Browse files Browse the repository at this point in the history
(ktlint 1.0.0 will require a lot more; I haven't analyzed that yet.)
  • Loading branch information
JonathanLennox authored Sep 26, 2023
1 parent 48d00e9 commit f5f3991
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ open class PacketInfo @JvmOverloads constructor(
fun sent() {
var actions: List<() -> Unit> = Collections.emptyList()
synchronized(this) {
onSentActions?.let { actions = it; onSentActions = null } ?: run { return@sent }
onSentActions?.let {
actions = it
onSentActions = null
} ?: run { return@sent }
}
for (action in actions) {
action.invoke()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class TccGeneratorNodeTest : ShouldSpec() {

private val clock: FakeClock = FakeClock()
private val tccPackets = mutableListOf<RtcpPacket>()
private val onTccReady = { tccPacket: RtcpPacket -> tccPackets.add(tccPacket); Unit }
private val onTccReady = { tccPacket: RtcpPacket ->
tccPackets.add(tccPacket)
Unit
}
private val streamInformationStore = StreamInformationStoreImpl()
private val tccExtensionId = 5

Expand Down
8 changes: 6 additions & 2 deletions rtp/src/test/kotlin/org/jitsi/rtp/rtcp/RtcpReportBlockTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ class RtcpReportBlockTest : ShouldSpec() {

val reportBlockData = with(ByteBuffer.allocate(24)) {
putInt(expectedSsrc.toInt())
put(expectedFractionLost.toByte()); put3Bytes(expectedCumulativeLost)
putShort(expectedSeqNumCycles.toShort()); putShort(expectedSeqNum.toShort())
put(expectedFractionLost.toByte())
put3Bytes(expectedCumulativeLost)

putShort(expectedSeqNumCycles.toShort())
putShort(expectedSeqNum.toShort())

putInt(expectedInterarrivalJitter.toInt())
putInt(expectedLastSrTimestamp.toInt())
putInt(expectedDelaySinceLastSr.toInt())
Expand Down

0 comments on commit f5f3991

Please sign in to comment.