MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / makeWaypoint

Function makeWaypoint

src/engine/api/json_factory.cpp:237–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237util::json::Object
238makeWaypoint(const util::Coordinate &location, const double &distance, std::string name)
239{
240 util::json::Object waypoint;
241 waypoint.values.reserve(3);
242
243 waypoint.values.emplace("location", detail::coordinateToLonLat(location));
244 waypoint.values.emplace("name", std::move(name));
245 waypoint.values.emplace("distance", distance);
246 return waypoint;
247}
248
249util::json::Object makeWaypoint(const util::Coordinate &location,
250 const double &distance,

Callers 1

MakeWaypointMethod · 0.85

Calls 4

coordinateToLonLatFunction · 0.85
ToBase64Method · 0.80
reserveMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected