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-compute/src | |
| 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-compute/src')
| -rw-r--r-- | opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt index f6324e13..e501033a 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt +++ b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt @@ -80,7 +80,7 @@ public abstract class SimAbstractMachine(private val clock: Clock) : SimMachine override suspend fun run(workload: SimWorkload, meta: Map<String, Any>): Unit = withContext(context) { require(!isTerminated) { "Machine is terminated" } val ctx = Context(meta) - val totalCapacity = model.cpus.sumByDouble { it.frequency } + val totalCapacity = model.cpus.sumOf { it.frequency } _speed = DoubleArray(model.cpus.size) { 0.0 } var totalSpeed = 0.0 |
