From 7af3d8ebd7c5f66f8ed77920af4ed2901d102433 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Wed, 5 Jan 2022 11:40:26 +0100 Subject: [PATCH] Improve readability --- core/src/container.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/container.cpp b/core/src/container.cpp index 2a360b2b..d678ad7d 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -260,7 +260,7 @@ void ContainerBasePrivate::copyState(Interface::iterator external, const Interfa auto internals{ externalToInternalMap().equal_range(&*external) }; for (auto& i = internals.first; i != internals.second; ++i) { // TODO: Not only update status, but full priority! - setStatus(i->second, external->priority().status()); + setStatus(i->get(), external->priority().status()); } return; } @@ -690,9 +690,8 @@ bool SerialContainer::canCompute() const { void SerialContainer::compute() { for (const auto& stage : pimpl()->children()) { - if (!stage->pimpl()->canCompute()) - continue; - stage->pimpl()->runCompute(); + if (stage->pimpl()->canCompute()) + stage->pimpl()->runCompute(); } }