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:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-06-09 16:59:36 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:08:35 +0300
commitaf730363bda56116403fe6e1d1d75dc06eeb115b (patch)
treec84241f8b80e555bf2ec6e1e48c889225cb0f03a /platform/location.hpp
parentcd0dc231ad79c089b254038ffe0f8141cf0989b0 (diff)
Review fixes
Diffstat (limited to 'platform/location.hpp')
-rw-r--r--platform/location.hpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index ba640a60cb..c9a0c6ff69 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -178,19 +178,34 @@ namespace location
m2::PointD m_matchedPosition;
size_t m_indexInRoute;
bool m_isPositionMatched;
+ bool m_hasDistanceFromBegin;
+ double m_distanceFromBegin;
public:
- RouteMatchingInfo() : m_matchedPosition(0., 0.), m_indexInRoute(0), m_isPositionMatched(false) {}
- void Set(m2::PointD const & matchedPosition, size_t indexInRoute)
+ RouteMatchingInfo()
+ : m_matchedPosition(0., 0.)
+ , m_indexInRoute(0)
+ , m_isPositionMatched(false)
+ , m_hasDistanceFromBegin(false)
+ , m_distanceFromBegin(0.0)
+ {}
+
+ void Set(m2::PointD const & matchedPosition, size_t indexInRoute, double distanceFromBegin)
{
m_matchedPosition = matchedPosition;
m_indexInRoute = indexInRoute;
m_isPositionMatched = true;
+
+ m_distanceFromBegin = distanceFromBegin;
+ m_hasDistanceFromBegin = true;
}
+
void Reset() { m_isPositionMatched = false; }
bool IsMatched() const { return m_isPositionMatched; }
size_t GetIndexInRoute() const { return m_indexInRoute; }
m2::PointD GetPosition() const { return m_matchedPosition; }
+ bool HasDistanceFromBegin() const { return m_hasDistanceFromBegin; }
+ double GetDistanceFromBegin() const { return m_distanceFromBegin; }
};
// Do not change the order and values