remove explicit c'tor from Coordinate, use initializer list in PolylineCompressor
This commit is contained in:
		
							parent
							
								
									186ad5d444
								
							
						
					
					
						commit
						e67cf578ae
					
				| @ -76,7 +76,7 @@ JSON::String PolylineCompressor::printEncodedString(const std::vector<SegmentInf | ||||
|     std::vector<int> delta_numbers; | ||||
|     if (!polyline.empty()) | ||||
|     { | ||||
|         FixedPointCoordinate last_coordinate = FixedPointCoordinate{0, 0}; | ||||
|         FixedPointCoordinate last_coordinate = {0, 0}; | ||||
|         for (const auto &segment : polyline) | ||||
|         { | ||||
|             if (segment.necessary) | ||||
|  | ||||
| @ -40,7 +40,7 @@ struct FixedPointCoordinate | ||||
|     int lon; | ||||
| 
 | ||||
|     FixedPointCoordinate(); | ||||
|     explicit FixedPointCoordinate(int lat, int lon); | ||||
|     FixedPointCoordinate(int lat, int lon); | ||||
|     void Reset(); | ||||
|     bool isSet() const; | ||||
|     bool isValid() const; | ||||
| @ -55,10 +55,8 @@ struct FixedPointCoordinate | ||||
|     static float ApproximateEuclideanDistance(const FixedPointCoordinate &first_coordinate, | ||||
|                                               const FixedPointCoordinate &second_coordinate); | ||||
| 
 | ||||
|     static float ApproximateEuclideanDistance(const int lat1, | ||||
|                                               const int lon1, | ||||
|                                               const int lat2, | ||||
|                                               const int lon2); | ||||
|     static float | ||||
|     ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2); | ||||
| 
 | ||||
|     static float ApproximateSquaredEuclideanDistance(const FixedPointCoordinate &first_coordinate, | ||||
|                                                      const FixedPointCoordinate &second_coordinate); | ||||
| @ -81,10 +79,10 @@ struct FixedPointCoordinate | ||||
|                                               FixedPointCoordinate &nearest_location, | ||||
|                                               float &ratio); | ||||
| 
 | ||||
|     static int OrderedPerpendicularDistanceApproximation(const FixedPointCoordinate& segment_source, | ||||
|                                                          const FixedPointCoordinate& segment_target, | ||||
|                                                          const FixedPointCoordinate& query_location); | ||||
| 
 | ||||
|     static int | ||||
|     OrderedPerpendicularDistanceApproximation(const FixedPointCoordinate &segment_source, | ||||
|                                               const FixedPointCoordinate &segment_target, | ||||
|                                               const FixedPointCoordinate &query_location); | ||||
| 
 | ||||
|     static float GetBearing(const FixedPointCoordinate &A, const FixedPointCoordinate &B); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user