Runs scripts/format.sh

This commit is contained in:
Daniel J. Hofmann
2016-03-03 14:26:13 +01:00
committed by Patrick Niklaus
parent bb06e044f5
commit 7c30ea32bf
70 changed files with 457 additions and 399 deletions
+8 -3
View File
@@ -70,10 +70,15 @@ std::string encodePolyline(CoordVectorForwardIter begin, CoordVectorForwardIter
delta_numbers.reserve((size - 1) * 2);
int current_lat = 0;
int current_lon = 0;
std::for_each(begin, end, [&delta_numbers, &current_lat, &current_lon](const util::Coordinate loc)
std::for_each(begin, end,
[&delta_numbers, &current_lat, &current_lon](const util::Coordinate loc)
{
const int lat_diff = std::round(static_cast<int>(loc.lat) * detail::COORDINATE_TO_POLYLINE) - current_lat;
const int lon_diff = std::round(static_cast<int>(loc.lon) * detail::COORDINATE_TO_POLYLINE) - current_lon;
const int lat_diff =
std::round(static_cast<int>(loc.lat) * detail::COORDINATE_TO_POLYLINE) -
current_lat;
const int lon_diff =
std::round(static_cast<int>(loc.lon) * detail::COORDINATE_TO_POLYLINE) -
current_lon;
delta_numbers.emplace_back(lat_diff);
delta_numbers.emplace_back(lon_diff);
current_lat += lat_diff;