make comparsion explicitly unsigned
This commit is contained in:
		
							parent
							
								
									d2f19353ed
								
							
						
					
					
						commit
						e36e9fd629
					
				| @ -98,7 +98,7 @@ template <class DataFacadeT> class DistanceTablePlugin : public BasePlugin | |||||||
|         std::vector<PhantomNode> phantom_node_vector(raw_route.raw_via_node_coordinates.size()); |         std::vector<PhantomNode> phantom_node_vector(raw_route.raw_via_node_coordinates.size()); | ||||||
|         const bool checksum_OK = (route_parameters.check_sum == raw_route.check_sum); |         const bool checksum_OK = (route_parameters.check_sum == raw_route.check_sum); | ||||||
| 
 | 
 | ||||||
|         unsigned max_locations = std::min(25, max_locations); |         unsigned max_locations = std::min(25u, max_locations); | ||||||
|         for (unsigned i = 0; i < max_locations; ++i) |         for (unsigned i = 0; i < max_locations; ++i) | ||||||
|         { |         { | ||||||
|             if (checksum_OK && i < route_parameters.hints.size() && |             if (checksum_OK && i < route_parameters.hints.size() && | ||||||
|  | |||||||
| @ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||||||
| #include "../Descriptors/JSONDescriptor.h" | #include "../Descriptors/JSONDescriptor.h" | ||||||
| #include "../Util/SimpleLogger.h" | #include "../Util/SimpleLogger.h" | ||||||
| #include "../Util/StringUtil.h" | #include "../Util/StringUtil.h" | ||||||
|  | #include "../Util/TimingUtil.h" | ||||||
| 
 | 
 | ||||||
| #include <cstdlib> | #include <cstdlib> | ||||||
| 
 | 
 | ||||||
| @ -123,6 +124,7 @@ template <class DataFacadeT> class ViaRoutePlugin : public BasePlugin | |||||||
| 
 | 
 | ||||||
|         const bool is_alternate_requested = route_parameters.alternate_route; |         const bool is_alternate_requested = route_parameters.alternate_route; | ||||||
|         const bool is_only_one_segment = (1 == raw_route.segment_end_coordinates.size()); |         const bool is_only_one_segment = (1 == raw_route.segment_end_coordinates.size()); | ||||||
|  |         TIMER_START(routing); | ||||||
|         if (is_alternate_requested && is_only_one_segment) |         if (is_alternate_requested && is_only_one_segment) | ||||||
|         { |         { | ||||||
|             search_engine_ptr->alternative_path(raw_route.segment_end_coordinates.front(), |             search_engine_ptr->alternative_path(raw_route.segment_end_coordinates.front(), | ||||||
| @ -132,6 +134,8 @@ template <class DataFacadeT> class ViaRoutePlugin : public BasePlugin | |||||||
|         { |         { | ||||||
|             search_engine_ptr->shortest_path(raw_route.segment_end_coordinates, raw_route); |             search_engine_ptr->shortest_path(raw_route.segment_end_coordinates, raw_route); | ||||||
|         } |         } | ||||||
|  |         TIMER_STOP(routing); | ||||||
|  |         SimpleLogger().Write() << "routing took " << TIMER_MSEC(routing) << "ms"; | ||||||
| 
 | 
 | ||||||
|         if (INVALID_EDGE_WEIGHT == raw_route.shortest_path_length) |         if (INVALID_EDGE_WEIGHT == raw_route.shortest_path_length) | ||||||
|         { |         { | ||||||
| @ -170,7 +174,10 @@ template <class DataFacadeT> class ViaRoutePlugin : public BasePlugin | |||||||
|         phantom_nodes.source_phantom = raw_route.segment_end_coordinates.front().source_phantom; |         phantom_nodes.source_phantom = raw_route.segment_end_coordinates.front().source_phantom; | ||||||
|         phantom_nodes.target_phantom = raw_route.segment_end_coordinates.back().target_phantom; |         phantom_nodes.target_phantom = raw_route.segment_end_coordinates.back().target_phantom; | ||||||
|         descriptor->SetConfig(descriptor_config); |         descriptor->SetConfig(descriptor_config); | ||||||
|  |         TIMER_START(descriptor); | ||||||
|         descriptor->Run(raw_route, phantom_nodes, facade, reply); |         descriptor->Run(raw_route, phantom_nodes, facade, reply); | ||||||
|  |         TIMER_STOP(descriptor); | ||||||
|  |         SimpleLogger().Write() << "descriptor took " << TIMER_MSEC(descriptor) << "ms"; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   private: |   private: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user