const'ing new function
This commit is contained in:
parent
a9fdabf926
commit
8afad5614a
@ -34,7 +34,7 @@ class ShortestPathRouting : public BasicRoutingInterface<DataFacadeT>{
|
|||||||
typedef SearchEngineData::QueryHeap QueryHeap;
|
typedef SearchEngineData::QueryHeap QueryHeap;
|
||||||
SearchEngineData & engine_working_data;
|
SearchEngineData & engine_working_data;
|
||||||
|
|
||||||
int ComputeEdgeOffset(const PhantomNode & phantom) {
|
int ComputeEdgeOffset(const PhantomNode & phantom) const {
|
||||||
return phantom.weight1 + (phantom.isBidirected() ? phantom.weight2 : 0);
|
return phantom.weight1 + (phantom.isBidirected() ? phantom.weight2 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +270,10 @@ public:
|
|||||||
|
|
||||||
//Plug paths together, s.t. end of packed path is begin of temporary packed path
|
//Plug paths together, s.t. end of packed path is begin of temporary packed path
|
||||||
if( !packed_path1.empty() && !packed_path2.empty() ) {
|
if( !packed_path1.empty() && !packed_path2.empty() ) {
|
||||||
if( temporary_packed_path1.front() == temporary_packed_path2.front() ) {
|
if(
|
||||||
|
temporary_packed_path1.front() ==
|
||||||
|
temporary_packed_path2.front()
|
||||||
|
) {
|
||||||
//both new route segments start with the same node
|
//both new route segments start with the same node
|
||||||
//thus, one of the packedPath must go.
|
//thus, one of the packedPath must go.
|
||||||
BOOST_ASSERT_MSG(
|
BOOST_ASSERT_MSG(
|
||||||
@ -334,7 +337,6 @@ public:
|
|||||||
remove_consecutive_duplicates_from_vector(packed_path1);
|
remove_consecutive_duplicates_from_vector(packed_path1);
|
||||||
super::UnpackPath(packed_path1, raw_route_data.computedShortestPath);
|
super::UnpackPath(packed_path1, raw_route_data.computedShortestPath);
|
||||||
raw_route_data.lengthOfShortestPath = std::min(distance1, distance2);
|
raw_route_data.lengthOfShortestPath = std::min(distance1, distance2);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user