Skip to content

Commit

Permalink
fix assertion issue #26
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke authored and v4hn committed Feb 26, 2018
1 parent 96184c2 commit 82634fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,14 @@ void SerialContainer::onNewSolution(const SolutionBase &current)

// collect (and sort) all solutions spanning from start to end of this container
ordered<SerialSolution> sorted;
SerialContainer::solution_container solution;
solution.reserve(children.size());
for (auto& in : incoming.solutions) {
for (auto& out : outgoing.solutions) {
InterfaceState::Priority prio(in.first.size() + 1 + out.first.size(),
in.second + current.cost() + out.second);
// found a complete solution path connecting start to end?
if (prio.depth() == children.size()) {
assert(solution.empty());
SerialContainer::solution_container solution;
solution.reserve(children.size());
// insert incoming solutions in reverse order
solution.insert(solution.end(), in.first.rbegin(), in.first.rend());
// insert current solution
Expand Down

0 comments on commit 82634fd

Please sign in to comment.