Skip to content

Commit 2ab87a2

Browse files
committed
remember internal/external mapping before pushing the new states
Doesn't make a difference in single-threaded planning, but still better.
1 parent 16387bc commit 2ab87a2

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
@@ -197,9 +197,9 @@ void ContainerBasePrivate::copyState(Interface::iterator external, const Interfa
197197

198198
// create a clone of external state within target interface (child's starts() or ends())
199199
auto internal = states_.insert(states_.end(), InterfaceState(*external));
200-
target->add(*internal);
201200
// and remember the mapping between them
202201
internalToExternalMap().insert(std::make_pair(&*internal, &*external));
202+
target->add(*internal);
203203
}
204204

205205
void ContainerBasePrivate::liftSolution(const SolutionBasePtr& solution, const InterfaceState* internal_from,

0 commit comments

Comments
 (0)