clang format
This commit is contained in:
		
							parent
							
								
									c885d03830
								
							
						
					
					
						commit
						1e9e420d91
					
				| @ -120,8 +120,9 @@ struct RouteParameters : public BaseParameters | ||||
|                     const boost::optional<bool> continue_straight_, | ||||
|                     Args... args_) | ||||
|         : BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_}, | ||||
|           annotations_type{annotations_}, annotations{annotations_ == AnnotationsType::None ? false : true}, geometries{geometries_}, | ||||
|           overview{overview_}, continue_straight{continue_straight_} | ||||
|           annotations_type{annotations_}, | ||||
|           annotations{annotations_ == AnnotationsType::None ? false : true}, | ||||
|           geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_} | ||||
|     { | ||||
|     } | ||||
| 
 | ||||
| @ -136,8 +137,7 @@ struct RouteParameters : public BaseParameters | ||||
|     bool IsValid() const { return coordinates.size() >= 2 && BaseParameters::IsValid(); } | ||||
| }; | ||||
| 
 | ||||
| inline bool operator&(RouteParameters::AnnotationsType lhs, | ||||
|                                                   RouteParameters::AnnotationsType rhs) | ||||
| inline bool operator&(RouteParameters::AnnotationsType lhs, RouteParameters::AnnotationsType rhs) | ||||
| { | ||||
|     return static_cast<bool>( | ||||
|         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) & | ||||
| @ -157,7 +157,6 @@ inline RouteParameters::AnnotationsType operator|=(RouteParameters::AnnotationsT | ||||
| { | ||||
|     return lhs = lhs | rhs; | ||||
| } | ||||
| 
 | ||||
| } | ||||
| } | ||||
| } | ||||
|  | ||||
| @ -45,7 +45,8 @@ struct RouteParametersGrammar : public BaseParametersGrammar<Iterator, Signature | ||||
|         const auto add_annotation = [](engine::api::RouteParameters &route_parameters, | ||||
|                                        engine::api::RouteParameters::AnnotationsType &route_param) { | ||||
|             route_parameters.annotations_type = route_parameters.annotations_type | route_param; | ||||
|             route_parameters.annotations = route_parameters.annotations_type != engine::api::RouteParameters::AnnotationsType::None; | ||||
|             route_parameters.annotations = route_parameters.annotations_type != | ||||
|                                            engine::api::RouteParameters::AnnotationsType::None; | ||||
|         }; | ||||
| 
 | ||||
|         geometries_type.add("geojson", engine::api::RouteParameters::GeometriesType::GeoJSON)( | ||||
|  | ||||
| @ -345,7 +345,8 @@ BOOST_AUTO_TEST_CASE(valid_route_urls) | ||||
|                                                       "overview=simplified&annotations=duration"); | ||||
|     BOOST_CHECK(result_15); | ||||
|     BOOST_CHECK_EQUAL(reference_15.geometries, result_15->geometries); | ||||
|     BOOST_CHECK_EQUAL(result_15->annotations_type == RouteParameters::AnnotationsType::Duration, true); | ||||
|     BOOST_CHECK_EQUAL(result_15->annotations_type == RouteParameters::AnnotationsType::Duration, | ||||
|                       true); | ||||
|     BOOST_CHECK_EQUAL(result_15->annotations, true); | ||||
| 
 | ||||
|     // parse multiple annotations correctly
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user