Add viaroute suport for new API

This commit is contained in:
Patrick Niklaus
2016-01-28 16:28:44 +01:00
parent 54ee76bcef
commit f3e72623e9
87 changed files with 3352 additions and 2099 deletions
+8 -3
View File
@@ -45,12 +45,17 @@ bool FixedPointCoordinate::IsValid() const
lon > 180 * COORDINATE_PRECISION || lon < -180 * COORDINATE_PRECISION);
}
bool FixedPointCoordinate::operator==(const FixedPointCoordinate &other) const
bool operator==(const FixedPointCoordinate lhs, const FixedPointCoordinate rhs)
{
return lat == other.lat && lon == other.lon;
return lhs.lat == rhs.lat && lhs.lon == rhs.lon;
}
std::ostream &operator<<(std::ostream &out, const FixedPointCoordinate &coordinate)
bool operator!=(const FixedPointCoordinate lhs, const FixedPointCoordinate rhs)
{
return !(lhs == rhs);
}
std::ostream &operator<<(std::ostream &out, const FixedPointCoordinate coordinate)
{
out << "(" << static_cast<double>(coordinate.lat / COORDINATE_PRECISION) << ","
<< static_cast<double>(coordinate.lon / COORDINATE_PRECISION) << ")";