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:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-04-28 16:56:49 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:47:12 +0300
commitcd7899f83462fea94616c20f5ffb0b4480cc5852 (patch)
treea98f980465984722aba35ed5b22c22d1aa20ed11 /routing/base
parent2f7d3ce473d458505ac1d4e5e814c8072402bb1b (diff)
PR fixes
Diffstat (limited to 'routing/base')
-rw-r--r--routing/base/astar_algorithm.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/routing/base/astar_algorithm.hpp b/routing/base/astar_algorithm.hpp
index 4f63264218..9351c15d83 100644
--- a/routing/base/astar_algorithm.hpp
+++ b/routing/base/astar_algorithm.hpp
@@ -22,7 +22,7 @@ public:
using TEdgeType = typename TGraphType::TEdgeType;
static uint32_t const kCancelledPollPeriod;
- static uint32_t const kQueueSwtichPeriod;
+ static uint32_t const kQueueSwitchPeriod;
static double const kEpsilon;
enum class Result
@@ -142,7 +142,7 @@ uint32_t const AStarAlgorithm<TGraph>::kCancelledPollPeriod = 128;
// static
template <typename TGraph>
-uint32_t const AStarAlgorithm<TGraph>::kQueueSwtichPeriod = 128;
+uint32_t const AStarAlgorithm<TGraph>::kQueueSwitchPeriod = 128;
// static
template <typename TGraph>
@@ -258,7 +258,7 @@ typename AStarAlgorithm<TGraph>::Result AStarAlgorithm<TGraph>::FindPathBidirect
if (steps % kCancelledPollPeriod == 0 && IsCancelled())
return Result::Cancelled;
- if (steps % kQueueSwtichPeriod == 0)
+ if (steps % kQueueSwitchPeriod == 0)
swap(cur, nxt);
double const curTop = cur->TopDistance();
@@ -302,8 +302,8 @@ typename AStarAlgorithm<TGraph>::Result AStarAlgorithm<TGraph>::FindPathBidirect
CHECK(reducedLen >= -kEpsilon, ("Invariant violated:", reducedLen, "<", -kEpsilon));
double newReducedDist = stateV.distance + max(reducedLen, 0.0);
- typename map<TVertexType, double>::const_iterator t = cur->bestDistance.find(stateW.vertex);
- if (t != cur->bestDistance.end() && newReducedDist >= t->second - kEpsilon)
+ auto it = cur->bestDistance.find(stateW.vertex);
+ if (it != cur->bestDistance.end() && newReducedDist >= it->second - kEpsilon)
continue;
if (nxt->bestDistance.find(stateW.vertex) != nxt->bestDistance.end())