const'ing new function

This commit is contained in:
Dennis Luxen 2013-09-22 22:29:03 +02:00
parent a9fdabf926
commit 8afad5614a

View File

@ -34,7 +34,7 @@ class ShortestPathRouting : public BasicRoutingInterface<DataFacadeT>{
typedef SearchEngineData::QueryHeap QueryHeap;
SearchEngineData & engine_working_data;
int ComputeEdgeOffset(const PhantomNode & phantom) {
int ComputeEdgeOffset(const PhantomNode & phantom) const {
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
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
//thus, one of the packedPath must go.
BOOST_ASSERT_MSG(
@ -328,13 +331,12 @@ public:
distance2 += local_upper_bound2;
}
if( distance1 > distance2 ){
if( distance1 > distance2 ) {
std::swap( packed_path1, packed_path2 );
}
remove_consecutive_duplicates_from_vector(packed_path1);
super::UnpackPath(packed_path1, raw_route_data.computedShortestPath);
raw_route_data.lengthOfShortestPath = std::min(distance1, distance2);
return;
}
};