From c2590636b1745678d7e94a13f91536108aa8ecd6 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Tue, 13 Mar 2018 21:04:06 +0200 Subject: [PATCH] fixup! SerialContainer: don't consider failures for solutions --- core/src/container.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/container.cpp b/core/src/container.cpp index 5500a897..5561c18c 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -314,10 +314,6 @@ void SerialContainer::onNewSolution(const SolutionBase ¤t) const StagePrivate *creator = current.creator(); auto& children = impl->children(); - if (current.isFailure()) { - return; // don't consider failures - } - // find number of stages before and after creator stage size_t num_before = 0, num_after = 0; for (auto it = children.begin(), end = children.end(); it != end; ++it, ++num_before) @@ -346,6 +342,8 @@ void SerialContainer::onNewSolution(const SolutionBase ¤t) in.second + current.cost() + out.second); // found a complete solution path connecting start to end? if (prio.depth() == children.size()) { + if (std::isinf(prio.cost())) + continue; // don't propagate failures assert(solution.empty()); // insert incoming solutions in reverse order solution.insert(solution.end(), in.first.rbegin(), in.first.rend());