Refactoring _Coordinate class
This commit is contained in:
@@ -36,7 +36,7 @@ public:
|
||||
virtual const std::string & GetDescriptor() const = 0;
|
||||
virtual void HandleRequest(const RouteParameters & routeParameters, http::Reply& reply) = 0;
|
||||
|
||||
inline bool checkCoord(const _Coordinate & c) {
|
||||
inline bool checkCoord(const FixedPointCoordinate & c) {
|
||||
if(
|
||||
c.lat > 90*COORDINATE_PRECISION ||
|
||||
c.lat < -90*COORDINATE_PRECISION ||
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
}
|
||||
|
||||
//query to helpdesk
|
||||
_Coordinate result;
|
||||
FixedPointCoordinate result;
|
||||
std::string tmp;
|
||||
//json
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ struct RawRouteData {
|
||||
std::vector< _PathData > computedShortestPath;
|
||||
std::vector< _PathData > computedAlternativePath;
|
||||
std::vector< PhantomNodes > segmentEndCoordinates;
|
||||
std::vector< _Coordinate > rawViaNodeCoordinates;
|
||||
std::vector< FixedPointCoordinate > rawViaNodeCoordinates;
|
||||
unsigned checkSum;
|
||||
int lengthOfShortestPath;
|
||||
int lengthOfAlternativePath;
|
||||
|
||||
@@ -52,7 +52,7 @@ struct RouteParameters {
|
||||
std::string jsonpParameter;
|
||||
std::string language;
|
||||
std::vector<std::string> hints;
|
||||
std::vector<_Coordinate> coordinates;
|
||||
std::vector<FixedPointCoordinate> coordinates;
|
||||
typedef HashTable<std::string, std::string>::const_iterator OptionsIterator;
|
||||
|
||||
void setZoomLevel(const short i) {
|
||||
@@ -109,7 +109,7 @@ struct RouteParameters {
|
||||
void addCoordinate(const boost::fusion::vector < double, double > & arg_) {
|
||||
int lat = COORDINATE_PRECISION*boost::fusion::at_c < 0 > (arg_);
|
||||
int lon = COORDINATE_PRECISION*boost::fusion::at_c < 1 > (arg_);
|
||||
coordinates.push_back(_Coordinate(lat, lon));
|
||||
coordinates.push_back(FixedPointCoordinate(lat, lon));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user