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
path: root/map
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-12 15:05:48 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-13 10:14:13 +0300
commit49f9f9117c52a92485fd233565795a419f33482b (patch)
tree04913b718f2b964139af871b708806a53f2eaf63 /map
parentf7c94e03a90a6571186416c611d1f20c28d4e18e (diff)
git-clang-format
Diffstat (limited to 'map')
-rw-r--r--map/traffic_manager.cpp20
-rw-r--r--map/traffic_manager.hpp1
2 files changed, 9 insertions, 12 deletions
diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp
index f352c356c4..87de04ea3a 100644
--- a/map/traffic_manager.cpp
+++ b/map/traffic_manager.cpp
@@ -212,8 +212,8 @@ void TrafficManager::UpdateMyPosition(MyPosition const & myPosition)
if (!IsEnabled() || IsInvalidState())
return;
- m2::RectD const rect = MercatorBounds::RectByCenterXYAndSizeInMeters(myPosition.m_position,
- kSquareSideM / 2.0);
+ m2::RectD const rect =
+ MercatorBounds::RectByCenterXYAndSizeInMeters(myPosition.m_position, kSquareSideM / 2.0);
// Request traffic.
UpdateActiveMwms(rect, m_lastRoutingMwmsByRect, m_activeRoutingMwms);
@@ -314,13 +314,13 @@ void TrafficManager::RequestTrafficData(MwmSet::MwmId const & mwmId, bool force)
void TrafficManager::RequestTrafficData()
{
- if ((m_activeDrapeMwms.empty() && m_activeRoutingMwms.empty())
- || !IsEnabled() || IsInvalidState())
+ if ((m_activeDrapeMwms.empty() && m_activeRoutingMwms.empty()) || !IsEnabled() ||
+ IsInvalidState())
{
return;
}
- ForEachActiveMwm([this](MwmSet::MwmId const & mwmId){
+ ForEachActiveMwm([this](MwmSet::MwmId const & mwmId) {
ASSERT(mwmId.IsAlive(), ());
RequestTrafficData(mwmId, false /* force */);
});
@@ -341,8 +341,8 @@ void TrafficManager::OnTrafficRequestFailed(traffic::TrafficInfo && info)
if (info.GetAvailability() == traffic::TrafficInfo::Availability::Unknown &&
!it->second.m_isLoaded)
{
- if (m_activeDrapeMwms.find(info.GetMwmId()) != m_activeDrapeMwms.cend()
- || m_activeRoutingMwms.find(info.GetMwmId()) != m_activeRoutingMwms.cend())
+ if (m_activeDrapeMwms.find(info.GetMwmId()) != m_activeDrapeMwms.cend() ||
+ m_activeRoutingMwms.find(info.GetMwmId()) != m_activeRoutingMwms.cend())
{
if (it->second.m_retriesCount < kMaxRetriesCount)
RequestTrafficData(info.GetMwmId(), true /* force */);
@@ -413,8 +413,7 @@ void TrafficManager::CheckCacheSize()
seenTimings.insert(make_pair(mwmInfo.second.m_lastActiveTime, mwmInfo.first));
auto itSeen = seenTimings.begin();
- while (m_currentCacheSizeBytes > m_maxCacheSizeBytes &&
- m_mwmCache.size() > activeMwmsSize)
+ while (m_currentCacheSizeBytes > m_maxCacheSizeBytes && m_mwmCache.size() > activeMwmsSize)
{
ClearCache(itSeen->second);
++itSeen;
@@ -466,8 +465,7 @@ void TrafficManager::UpdateState()
bool expiredData = false;
bool noData = false;
- ForEachActiveMwm([&](MwmSet::MwmId const & mwmId)
- {
+ ForEachActiveMwm([&](MwmSet::MwmId const & mwmId) {
auto it = m_mwmCache.find(mwmId);
ASSERT(it != m_mwmCache.end(), ());
diff --git a/map/traffic_manager.hpp b/map/traffic_manager.hpp
index b1ae938efb..4179055fd3 100644
--- a/map/traffic_manager.hpp
+++ b/map/traffic_manager.hpp
@@ -98,7 +98,6 @@ private:
traffic::TrafficInfo::Availability m_lastAvailability;
};
-
void ThreadRoutine();
bool WaitForRequest(vector<MwmSet::MwmId> & mwms);