diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-05 23:14:56 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-18 15:21:29 +0200 |
| commit | cc9310efad6177909ff2f7415384d7c393383106 (patch) | |
| tree | 5e94f0443cdf1c63ec77248aaf520974e5bfd7d0 /opendc-simulator/opendc-simulator-resources | |
| parent | ef3868ec729f7ce3f5976d4f9a0c8b95098d9857 (diff) | |
chore: Address deprecations due to Kotlin 1.5
This change addresses the deprecations that were caused by the migration
to Kotlin 1.5.
Diffstat (limited to 'opendc-simulator/opendc-simulator-resources')
| -rw-r--r-- | opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt b/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt index 6ae04f27..653b53e0 100644 --- a/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt +++ b/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt @@ -82,7 +82,7 @@ public abstract class SimAbstractResourceAggregator(private val scheduler: SimRe return if (_remainingWorkFlush < now) { _remainingWorkFlush = now - _inputConsumers.sumByDouble { it._ctx?.remainingWork ?: 0.0 }.also { _remainingWork = it } + _inputConsumers.sumOf { it._ctx?.remainingWork ?: 0.0 }.also { _remainingWork = it } } else { _remainingWork } @@ -132,7 +132,7 @@ public abstract class SimAbstractResourceAggregator(private val scheduler: SimRe private fun updateCapacity() { // Adjust capacity of output resource - context.capacity = _inputConsumers.sumByDouble { it._ctx?.capacity ?: 0.0 } + context.capacity = _inputConsumers.sumOf { it._ctx?.capacity ?: 0.0 } } /* Input */ |
