diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-17 13:43:29 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:01:48 +0300 |
commit | ad69ed8eca1eae07aef1479e1cde0faa2832c36b (patch) | |
tree | 2029f849d106f3f7395c80804c9069ff9d435041 /routing | |
parent | d84b17f6d37baedf871321f61f3dd44c021fc4ae (diff) |
Xcode warning fixes.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/route.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routing/route.cpp b/routing/route.cpp index c59b6248b3..67ad55e6da 100644 --- a/routing/route.cpp +++ b/routing/route.cpp @@ -118,7 +118,7 @@ uint32_t Route::GetCurrentTimeToEndSec() const if (idx > 0) time -= m_times[idx - 1].second; - auto distFn = [&](uint32_t start, uint32_t end) + auto distFn = [&](size_t start, size_t end) { if (start > polySz || end > polySz) { @@ -126,7 +126,7 @@ uint32_t Route::GetCurrentTimeToEndSec() const return 0.; } double d = 0.0; - for (uint32_t i = start + 1; i < end; ++i) + for (size_t i = start + 1; i < end; ++i) d += MercatorBounds::DistanceOnEarth(poly.GetPoint(i - 1), poly.GetPoint(i)); return d; }; @@ -155,7 +155,7 @@ void Route::GetCurrentTurn(double & distanceToTurnMeters, turns::TurnItem & turn } turns::TurnItem t; - t.m_index = m_poly.GetCurrentIter().m_ind; + t.m_index = static_cast<uint32_t>(m_poly.GetCurrentIter().m_ind); auto it = upper_bound(m_turns.begin(), m_turns.end(), t, [](turns::TurnItem const & lhs, turns::TurnItem const & rhs) { |