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>2015-05-07 10:13:19 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:47:33 +0300
commitb0090c9b838c4318f174c1078a69ea1861635689 (patch)
tree60501cfbddd90893fb451eda758ac421367681bd /platform/location.hpp
parent42df20e39c5fbad309a618029b166a048a031ecf (diff)
Fixing after colleagues comments.
Diffstat (limited to 'platform/location.hpp')
-rw-r--r--platform/location.hpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index 2bb9921230..28bc74b369 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -93,16 +93,22 @@ namespace location
class FollowingInfo
{
public:
- struct SingleLaneInfoOuter
+ // SingleLaneInfoClient is used for passing information about a lane to client platforms such as
+ // Android, iOS and so on.
+ struct SingleLaneInfoClient
{
- vector<int8_t> m_lane;
- bool m_isActive;
- SingleLaneInfoOuter(routing::turns::SingleLaneInfo singleLaneInfo) : m_isActive(singleLaneInfo.m_isActive)
+ vector<int8_t> m_lane; // Possible directions for the lane.
+ bool m_isRecommended; // m_isRecommended is true if the lane is recommended for a user.
+
+ SingleLaneInfoClient(routing::turns::SingleLaneInfo const & singleLaneInfo)
+ : m_isRecommended(singleLaneInfo.m_isRecommended)
{
routing::turns::TSingleLane const & lane = singleLaneInfo.m_lane;
m_lane.resize(lane.size());
- transform(lane.begin(), lane.end(), m_lane.begin(),
- [] (routing::turns::LaneWay l) { return static_cast<int8_t>(l); });
+ transform(lane.cbegin(), lane.cend(), m_lane.begin(), [](routing::turns::LaneWay l)
+ {
+ return static_cast<int8_t>(l);
+ });
}
};
@@ -121,7 +127,7 @@ namespace location
//@}
int m_time;
// m_lanes contains lane information on the edge before the turn.
- vector<SingleLaneInfoOuter> m_lanes;
+ vector<SingleLaneInfoClient> m_lanes;
// The next street name
string m_targetName;