diff options
author | Maxim Pimenov <m@maps.me> | 2019-12-25 17:48:04 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-12-26 16:57:43 +0300 |
commit | 01fdd7fc4998ceea2c8edb0d5b7a5255fd72ea87 (patch) | |
tree | 60c0ffafb151a0dad35b4aa98f451ff968bc1d83 /web_api | |
parent | f5de0be1e3d79bad0fc53980536daf85b3823218 (diff) |
[omim] Replaced boost::optional with std::optional.
Since C++17, optional is part of the C++ Standard Library.
Diffstat (limited to 'web_api')
-rw-r--r-- | web_api/request_headers.cpp | 2 | ||||
-rw-r--r-- | web_api/request_headers.hpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/web_api/request_headers.cpp b/web_api/request_headers.cpp index 6fd027cc60..ad2964d3e3 100644 --- a/web_api/request_headers.cpp +++ b/web_api/request_headers.cpp @@ -32,7 +32,7 @@ platform::HttpClient::Headers GetCatalogHeaders(HeadersParams const & params) if (params.m_currentPosition) { std::ostringstream latLonStream; - auto const latLon = mercator::ToLatLon(params.m_currentPosition.get()); + auto const latLon = mercator::ToLatLon(*params.m_currentPosition); latLonStream << std::fixed << std::setprecision(3) << latLon.m_lat << "," << latLon.m_lon; result.emplace(kLatLonHeader, latLonStream.str()); } diff --git a/web_api/request_headers.hpp b/web_api/request_headers.hpp index d4f6ccc5a2..aab8d45f0d 100644 --- a/web_api/request_headers.hpp +++ b/web_api/request_headers.hpp @@ -6,16 +6,15 @@ #include "base/geo_object_id.hpp" +#include <optional> #include <vector> -#include <boost/optional.hpp> - namespace web_api { class HeadersParams { public: - boost::optional<m2::PointD> m_currentPosition; + std::optional<m2::PointD> m_currentPosition; std::vector<base::GeoObjectId> m_countryGeoIds; std::vector<base::GeoObjectId> m_cityGeoIds; }; |