Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2018-03-12 20:41:18 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2018-03-14 13:08:01 +0300
commit679b83cc72c9988dc4c8e7f8c39442c2cc39b35e (patch)
tree3a13afe0b6b748aa5a8eb2fe8c6a6bdcaa58ecfb /routing
parent58ca89534927fab37c9594ab034de1857717559e (diff)
Getting rid of mutable in FollowedPolyline class.
Diffstat (limited to 'routing')
-rw-r--r--routing/base/followed_polyline.cpp4
-rw-r--r--routing/base/followed_polyline.hpp7
-rw-r--r--routing/route.cpp2
-rw-r--r--routing/route.hpp2
4 files changed, 7 insertions, 8 deletions
diff --git a/routing/base/followed_polyline.cpp b/routing/base/followed_polyline.cpp
index eb03760871..b25e08e2bf 100644
--- a/routing/base/followed_polyline.cpp
+++ b/routing/base/followed_polyline.cpp
@@ -157,7 +157,7 @@ Iter FollowedPolyline::GetBestProjection(m2::RectD const & posRect,
}
Iter FollowedPolyline::UpdateProjectionByPrediction(m2::RectD const & posRect,
- double predictDistance) const
+ double predictDistance)
{
ASSERT(m_current.IsValid(), ());
ASSERT_LESS(m_current.m_ind, m_poly.GetSize() - 1, ());
@@ -176,7 +176,7 @@ Iter FollowedPolyline::UpdateProjectionByPrediction(m2::RectD const & posRect,
return res;
}
-Iter FollowedPolyline::UpdateProjection(m2::RectD const & posRect) const
+Iter FollowedPolyline::UpdateProjection(m2::RectD const & posRect)
{
ASSERT(m_current.IsValid(), ());
ASSERT_LESS(m_current.m_ind, m_poly.GetSize() - 1, ());
diff --git a/routing/base/followed_polyline.hpp b/routing/base/followed_polyline.hpp
index a63d0efa62..883adacb34 100644
--- a/routing/base/followed_polyline.hpp
+++ b/routing/base/followed_polyline.hpp
@@ -47,7 +47,6 @@ public:
double GetDistanceToEndMeters() const;
double GetDistFromCurPointToRoutePointMerc() const;
double GetDistFromCurPointToRoutePointMeters() const;
- double GetMercatorDistanceFromBegin() const;
/*! \brief Return next navigation point for direction widgets.
* Returns first geometry point from the polyline after your location if it is farther then
@@ -71,8 +70,8 @@ public:
double GetDistanceM(Iter const & it1, Iter const & it2) const;
- Iter UpdateProjectionByPrediction(m2::RectD const & posRect, double predictDistance) const;
- Iter UpdateProjection(m2::RectD const & posRect) const;
+ Iter UpdateProjectionByPrediction(m2::RectD const & posRect, double predictDistance);
+ Iter UpdateProjection(m2::RectD const & posRect);
Iter Begin() const;
Iter End() const;
@@ -95,7 +94,7 @@ private:
m2::PolylineD m_poly;
/// Iterator with the current position. Position sets with UpdateProjection methods.
- mutable Iter m_current;
+ Iter m_current;
size_t m_nextCheckpointIndex;
/// Precalculated info for fast projection finding.
std::vector<m2::ProjectionToSection<m2::PointD>> m_segProj;
diff --git a/routing/route.cpp b/routing/route.cpp
index c83d780bc2..bc835eb24d 100644
--- a/routing/route.cpp
+++ b/routing/route.cpp
@@ -243,7 +243,7 @@ void Route::GetCurrentDirectionPoint(m2::PointD & pt) const
m_poly.GetCurrentDirectionPoint(pt, kOnEndToleranceM);
}
-bool Route::MoveIterator(location::GpsInfo const & info) const
+bool Route::MoveIterator(location::GpsInfo const & info)
{
m2::RectD const rect = MercatorBounds::MetresToXY(
info.m_longitude, info.m_latitude,
diff --git a/routing/route.hpp b/routing/route.hpp
index 16d2fd8524..c3e7703e62 100644
--- a/routing/route.hpp
+++ b/routing/route.hpp
@@ -267,7 +267,7 @@ public:
void GetCurrentDirectionPoint(m2::PointD & pt) const;
/// @return true If position was updated successfully (projection within gps error radius).
- bool MoveIterator(location::GpsInfo const & info) const;
+ bool MoveIterator(location::GpsInfo const & info);
void MatchLocationToRoute(location::GpsInfo & location, location::RouteMatchingInfo & routeMatchingInfo) const;