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-14 11:34:09 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2018-03-14 13:08:01 +0300
commitf1ed22025853ad03a9401007f32fb13c21e375fb (patch)
treee4cf1de3ec5d8022ea30e5e3fc3943af41e8ac75 /routing
parentf3d64fafb692c2aefc83e43d7099482e64684749 (diff)
Review fixes.
Diffstat (limited to 'routing')
-rw-r--r--routing/routing_session.cpp6
-rw-r--r--routing/routing_session.hpp7
2 files changed, 6 insertions, 7 deletions
diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp
index 9d6b143bd2..d2879b71cc 100644
--- a/routing/routing_session.cpp
+++ b/routing/routing_session.cpp
@@ -173,7 +173,7 @@ void RoutingSession::RebuildRouteOnTrafficUpdate()
threads::MutexGuard guard(m_routingSessionMutex);
startPoint = m_lastGoodPosition;
- switch (m_state.load())
+ switch (m_state)
{
case RoutingNotActive:
case RouteNotReady:
@@ -567,7 +567,7 @@ traffic::SpeedGroup RoutingSession::MatchTraffic(
bool RoutingSession::DisableFollowMode()
{
- LOG(LINFO, ("Routing disables a following mode. State: ", m_state.load()));
+ LOG(LINFO, ("Routing disables a following mode. State: ", m_state));
threads::MutexGuard guard(m_routingSessionMutex);
if (m_state == RouteNotStarted || m_state == OnRoute)
{
@@ -580,7 +580,7 @@ bool RoutingSession::DisableFollowMode()
bool RoutingSession::EnableFollowMode()
{
- LOG(LINFO, ("Routing enables a following mode. State: ", m_state.load()));
+ LOG(LINFO, ("Routing enables a following mode. State: ", m_state));
threads::MutexGuard guard(m_routingSessionMutex);
if (m_state == RouteNotStarted || m_state == OnRoute)
{
diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp
index cfa179e91a..cdedf6e146 100644
--- a/routing/routing_session.hpp
+++ b/routing/routing_session.hpp
@@ -20,7 +20,6 @@
#include "base/mutex.hpp"
-#include "std/atomic.hpp"
#include "std/functional.hpp"
#include "std/limits.hpp"
#include "std/map.hpp"
@@ -215,8 +214,8 @@ private:
private:
unique_ptr<AsyncRouter> m_router;
shared_ptr<Route> m_route;
- atomic<State> m_state;
- atomic<bool> m_isFollowing;
+ State m_state;
+ bool m_isFollowing;
Checkpoints m_checkpoints;
size_t m_lastWarnedSpeedCameraIndex;
SpeedCameraRestriction m_lastFoundCamera;
@@ -228,7 +227,7 @@ private:
/// about camera will be sent at most once.
mutable bool m_speedWarningSignal;
- /// |m_routingSessionMutex| should be used for access to |m_route| member.
+ /// |m_routingSessionMutex| should be used for access to all members of RoutingSession class.
mutable threads::Mutex m_routingSessionMutex;
/// Current position metrics to check for RouteNeedRebuild state.