Skip to content

Commit 9da3a80

Browse files
rhaschkev4hn
authored andcommitted
Optimize setStatus(): only escalate to parent interface at boundaries of a partial solution
In all other cases internalToExternalMap().find(s) will fail anyway.
1 parent 47d2098 commit 9da3a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/container.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void ContainerBasePrivate::setStatus(const InterfaceState* s, InterfaceState::St
162162
}
163163

164164
// if possible (i.e. if state s has an external counterpart), escalate setStatus to external interface
165-
if (parent()) {
165+
if (parent() && trajectories<dir>(*s).empty()) {
166166
auto external{ internalToExternalMap().find(s) };
167167
if (external != internalToExternalMap().end()) { // do we have an external state?
168168
// only escalate if there is no other *enabled* internal state connected to the same external one

0 commit comments

Comments
 (0)