Use explicit std::function for to_lane_count instead of auto
This commit is contained in:
		
							parent
							
								
									79917d2c8e
								
							
						
					
					
						commit
						b108d8ea21
					
				@ -98,12 +98,11 @@ Intersection::getHighestConnectedLaneCount(const util::NodeBasedDynamicGraph &gr
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    BOOST_ASSERT(valid()); // non empty()
 | 
					    BOOST_ASSERT(valid()); // non empty()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const auto to_lane_count = [&](const ConnectedRoad &road) {
 | 
					    const std::function<std::uint8_t(const ConnectedRoad &)> to_lane_count =
 | 
				
			||||||
 | 
					        [&](const ConnectedRoad &road) {
 | 
				
			||||||
            return graph.GetEdgeData(road.eid).road_classification.GetNumberOfLanes();
 | 
					            return graph.GetEdgeData(road.eid).road_classification.GetNumberOfLanes();
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // boost::range::transformed sadly does not work with lamdas since they are not copy
 | 
					 | 
				
			||||||
    // constructable. We need to work around this :(
 | 
					 | 
				
			||||||
    std::uint8_t max_lanes = 0;
 | 
					    std::uint8_t max_lanes = 0;
 | 
				
			||||||
    const auto extract_maximal_value = [&max_lanes](std::uint8_t value) {
 | 
					    const auto extract_maximal_value = [&max_lanes](std::uint8_t value) {
 | 
				
			||||||
        max_lanes = std::max(max_lanes, value);
 | 
					        max_lanes = std::max(max_lanes, value);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user