simplify onNewFailure

give an elaborate reason for an empty overload that doesn't call the parent.
This commit is contained in:
v4hn 2021-09-02 22:00:41 +02:00
parent 3d5cecd753
commit aa733fcf5f

View File

@ -867,11 +867,11 @@ void FallbacksPrivate::initializeExternalInterfaces(InterfaceFlags expected) {
current_generator_ = children().begin(); current_generator_ = children().begin();
} }
void FallbacksPrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) { void FallbacksPrivate::onNewFailure(const Stage& /*child*/, const InterfaceState* /*from*/, const InterfaceState* /*to*/) {
// only react to failure if it's the last possible candidate failing // This override is deliberately empty.
// otherwise there might still be a feasible solution // The method prunes solution paths when a child failed to find a valid solution for it,
if(&child == &*children().back()) // but in Fallbacks the next child might still yield a successful solution
ContainerBasePrivate::onNewFailure(child, from, to); // Thus pruning must only occur once the last child is exhausted (inside computeFromExternal)
} }
void FallbacksPrivate::computeGenerate() { void FallbacksPrivate::computeGenerate() {