From 6447d4937617ab355b3157125bd3706aa235ee98 Mon Sep 17 00:00:00 2001 From: tiagohm Date: Mon, 20 May 2024 16:37:31 -0300 Subject: [PATCH] [api]: Fix empty block of code --- .../kotlin/nebulosa/alpaca/indi/device/mounts/ASCOMMount.kt | 6 +++--- .../nebulosa/alpaca/indi/device/rotators/ASCOMRotator.kt | 4 ++-- .../nebulosa/alpaca/indi/device/wheels/ASCOMFilterWheel.kt | 6 +++--- .../nebulosa/guiding/internal/IdentityGuideAlgorithm.kt | 2 +- .../main/kotlin/nebulosa/guiding/internal/RandomDither.kt | 2 +- .../src/main/kotlin/nebulosa/skycatalog/SkyCatalog.kt | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/mounts/ASCOMMount.kt b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/mounts/ASCOMMount.kt index 90c54264b..4f7dce29e 100644 --- a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/mounts/ASCOMMount.kt +++ b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/mounts/ASCOMMount.kt @@ -224,9 +224,9 @@ data class ASCOMMount( service.utcDate(device.number, dateTime.toInstant()).doRequest() } - override fun snoop(devices: Iterable) {} + override fun snoop(devices: Iterable) = Unit - override fun handleMessage(message: INDIProtocol) {} + override fun handleMessage(message: INDIProtocol) = Unit override fun onConnected() { processCapabilities() @@ -237,7 +237,7 @@ data class ASCOMMount( equatorialSystem = service.equatorialSystem(device.number).doRequest()?.value ?: equatorialSystem } - override fun onDisconnected() {} + override fun onDisconnected() = Unit override fun reset() { super.reset() diff --git a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/rotators/ASCOMRotator.kt b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/rotators/ASCOMRotator.kt index 3516873bc..26e372fe6 100644 --- a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/rotators/ASCOMRotator.kt +++ b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/rotators/ASCOMRotator.kt @@ -34,7 +34,7 @@ data class ASCOMRotator( processPosition() } - override fun onDisconnected() {} + override fun onDisconnected() = Unit override fun refresh(elapsedTimeInSeconds: Long) { super.refresh(elapsedTimeInSeconds) @@ -46,7 +46,7 @@ data class ASCOMRotator( } } - override fun snoop(devices: Iterable) {} + override fun snoop(devices: Iterable) = Unit override fun moveRotator(angle: Double) { service.moveTo(device.number, angle).doRequest() diff --git a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/wheels/ASCOMFilterWheel.kt b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/wheels/ASCOMFilterWheel.kt index dc2035dde..d327dcc32 100644 --- a/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/wheels/ASCOMFilterWheel.kt +++ b/nebulosa-alpaca-indi/src/main/kotlin/nebulosa/alpaca/indi/device/wheels/ASCOMFilterWheel.kt @@ -29,7 +29,7 @@ data class ASCOMFilterWheel( processNames() } - override fun onDisconnected() {} + override fun onDisconnected() = Unit override fun moveTo(position: Int) { if (position in 1..count && position != this.position) { @@ -55,9 +55,9 @@ data class ASCOMFilterWheel( sender.fireOnEventReceived(FilterWheelNamesChanged(this)) } - override fun snoop(devices: Iterable) {} + override fun snoop(devices: Iterable) = Unit - override fun handleMessage(message: INDIProtocol) {} + override fun handleMessage(message: INDIProtocol) = Unit private fun processPosition() { service.position(device.number).doRequest { diff --git a/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/IdentityGuideAlgorithm.kt b/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/IdentityGuideAlgorithm.kt index 61e7d8a0c..f7fae575e 100644 --- a/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/IdentityGuideAlgorithm.kt +++ b/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/IdentityGuideAlgorithm.kt @@ -6,5 +6,5 @@ class IdentityGuideAlgorithm(override val axis: GuideAxis) : GuideAlgorithm { override fun compute(input: Double) = input - override fun reset() {} + override fun reset() = Unit } diff --git a/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/RandomDither.kt b/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/RandomDither.kt index c24877604..e4fb17c55 100644 --- a/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/RandomDither.kt +++ b/nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/RandomDither.kt @@ -10,7 +10,7 @@ class RandomDither(private val random: Random = Random.Default) : Dither { return doubleArrayOf(ra, dec) } - override fun reset() {} + override fun reset() = Unit companion object { diff --git a/nebulosa-skycatalog/src/main/kotlin/nebulosa/skycatalog/SkyCatalog.kt b/nebulosa-skycatalog/src/main/kotlin/nebulosa/skycatalog/SkyCatalog.kt index dc52ca6fc..66b6f0157 100644 --- a/nebulosa-skycatalog/src/main/kotlin/nebulosa/skycatalog/SkyCatalog.kt +++ b/nebulosa-skycatalog/src/main/kotlin/nebulosa/skycatalog/SkyCatalog.kt @@ -39,7 +39,7 @@ abstract class SkyCatalog(estimatedSize: Int = 0) : Collection return res } - protected fun notifyLoadFinished() {} + protected fun notifyLoadFinished() = Unit override val size get() = data.size