Skip to content

Commit

Permalink
fix the offset case when there is no packed path to unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshkaj authored and Patrick Niklaus committed Apr 25, 2018
1 parent 16f53ff commit b0f2ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/routing_algorithms/many_to_many_ch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
// entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset =
target_phantom.GetForwardDistance() - source_phantom.GetForwardDistance();
distances_table[row_index * number_of_targets + column_index] += offset;
distances_table[row_index * number_of_targets + column_index] = offset;
}
else
{
Expand All @@ -306,7 +306,7 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
// entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset =
target_phantom.GetReverseDistance() - source_phantom.GetReverseDistance();
distances_table[row_index * number_of_targets + column_index] += offset;
distances_table[row_index * number_of_targets + column_index] = offset;
}
}
packed_leg.clear();
Expand Down

0 comments on commit b0f2ef2

Please sign in to comment.