const'ing new function
This commit is contained in:
		
							parent
							
								
									8c7be8e45f
								
							
						
					
					
						commit
						388ff10ff5
					
				@ -39,7 +39,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);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -275,7 +275,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(
 | 
				
			||||||
@ -337,7 +340,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