mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -55,9 +55,7 @@ namespace routing_quality::api::mapbox
|
||||
// static
|
||||
std::string const MapboxApi::kApiName = "mapbox";
|
||||
|
||||
MapboxApi::MapboxApi(std::string const & token)
|
||||
: RoutingApi(kApiName, token, kMaxRPS)
|
||||
{}
|
||||
MapboxApi::MapboxApi(std::string const & token) : RoutingApi(kApiName, token, kMaxRPS) {}
|
||||
|
||||
Response MapboxApi::CalculateRoute(Params const & params, int32_t /* startTimeZoneUTC */) const
|
||||
{
|
||||
@@ -120,8 +118,7 @@ std::string MapboxApi::GetDirectionsURL(Params const & params) const
|
||||
coords.emplace_back(mercator::ToLatLon(point));
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << kBaseURL << "directions/" << kDirectionsApiVersion << "/"
|
||||
<< VehicleTypeToMapboxType(params.m_type) << "/";
|
||||
oss << kBaseURL << "directions/" << kDirectionsApiVersion << "/" << VehicleTypeToMapboxType(params.m_type) << "/";
|
||||
oss << LatLonsToString(coords) << "?";
|
||||
oss << "access_token=" << GetAccessToken() << "&";
|
||||
oss << "overview=simplified&"
|
||||
@@ -130,4 +127,4 @@ std::string MapboxApi::GetDirectionsURL(Params const & params) const
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
} // namespace mapbox::api::routing_quality
|
||||
} // namespace routing_quality::api::mapbox
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "routing/routing_quality/api/mapbox/types.hpp"
|
||||
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -27,9 +27,7 @@ struct Geometry
|
||||
|
||||
struct Route
|
||||
{
|
||||
DECLARE_VISITOR(visitor(m_geometry, "geometry"),
|
||||
visitor(m_duration, "duration"),
|
||||
visitor(m_distance, "distance"))
|
||||
DECLARE_VISITOR(visitor(m_geometry, "geometry"), visitor(m_duration, "duration"), visitor(m_distance, "distance"))
|
||||
|
||||
Geometry m_geometry;
|
||||
double m_duration = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user