add more asserts to onNewSolution

Strictly speaking there is no need for the invariant,
but if something violates it a stage computed something it wasn't meant to.
This commit is contained in:
v4hn 2021-03-17 00:14:02 +01:00
parent 3b6c13e26b
commit b7f80939ef

View File

@ -353,7 +353,13 @@ inline void updateStatePrios(const SolutionSequence::container_type& partial_sol
}
void SerialContainer::onNewSolution(const SolutionBase& current) {
// failures should never trigger this callback
assert(!current.isFailure());
// states of solution must be active, otherwise this would not have been computed
assert(current.start()->priority().enabled());
assert(current.end()->priority().enabled());
auto impl = pimpl();
const Stage* creator = current.creator();
auto& children = impl->children();