Skip to content

Commit b7f8093

Browse files
committed
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.
1 parent 3b6c13e commit b7f8093

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/container.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ inline void updateStatePrios(const SolutionSequence::container_type& partial_sol
353353
}
354354

355355
void SerialContainer::onNewSolution(const SolutionBase& current) {
356+
// failures should never trigger this callback
356357
assert(!current.isFailure());
358+
359+
// states of solution must be active, otherwise this would not have been computed
360+
assert(current.start()->priority().enabled());
361+
assert(current.end()->priority().enabled());
362+
357363
auto impl = pimpl();
358364
const Stage* creator = current.creator();
359365
auto& children = impl->children();

0 commit comments

Comments
 (0)