diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-04-12 15:52:08 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-04-12 18:30:29 +0300 |
commit | a685936cae13b6a51028d1db0d023c5ab8ba09ca (patch) | |
tree | beaa4ed74e5283b4ed7362f6362279ba86f07946 /editor | |
parent | ce150f2169b1539eda6e845230102c8eca6e4d3a (diff) |
[std] Use new include style for coding, fixes.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/server_api.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/server_api.cpp b/editor/server_api.cpp index 49d93700be..26149aeaab 100644 --- a/editor/server_api.cpp +++ b/editor/server_api.cpp @@ -9,8 +9,8 @@ #include "base/string_utils.hpp" #include "base/timer.hpp" +#include <algorithm> #include <sstream> -#include <string> #include "3party/pugixml/src/pugixml.hpp" @@ -189,12 +189,12 @@ OsmOAuth::Response ServerApi06::GetXmlFeaturesInRect(double minLat, double minLo OsmOAuth::Response ServerApi06::GetXmlFeaturesAtLatLon(double lat, double lon, double radiusInMeters) const { double const latDegreeOffset = radiusInMeters * MercatorBounds::kDegreesInMeter; - double const minLat = max(-90.0, lat - latDegreeOffset); - double const maxLat = min( 90.0, lat + latDegreeOffset); - double const cosL = max(cos(base::DegToRad(max(fabs(minLat), fabs(maxLat)))), 0.00001); + double const minLat = std::max(-90.0, lat - latDegreeOffset); + double const maxLat = std::min( 90.0, lat + latDegreeOffset); + double const cosL = std::max(cos(base::DegToRad(std::max(fabs(minLat), fabs(maxLat)))), 0.00001); double const lonDegreeOffset = radiusInMeters * MercatorBounds::kDegreesInMeter / cosL; - double const minLon = max(-180.0, lon - lonDegreeOffset); - double const maxLon = min( 180.0, lon + lonDegreeOffset); + double const minLon = std::max(-180.0, lon - lonDegreeOffset); + double const maxLon = std::min( 180.0, lon + lonDegreeOffset); return GetXmlFeaturesInRect(minLat, minLon, maxLat, maxLon); } |