MCPcopy Create free account
hub / github.com/comaps/comaps / GetCoordsFromString

Method GetCoordsFromString

qt/routing_settings_dialog.cpp:56–67  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

54
55// static
56std::optional<ms::LatLon> RoutingSettings::GetCoordsFromString(std::string const & input)
57{
58 ms::LatLon coords;
59 strings::SimpleTokenizer iter(input, kDelim);
60 if (iter && strings::to_double(*iter, coords.m_lat))
61 {
62 ++iter;
63 if (iter && strings::to_double(*iter, coords.m_lon))
64 return coords;
65 }
66 return {};
67}
68
69// static
70std::optional<ms::LatLon> RoutingSettings::GetCoords(bool start)

Callers

nothing calls this directly

Calls 1

to_doubleFunction · 0.50

Tested by

no test coverage detected