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>2017-07-11 16:36:14 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-07-18 16:33:39 +0300
commitaa7c899f05fbdfd74ff0b2d668951406c97dee3c (patch)
tree82eb3e8542fce453d9475b5c1fc1b7eef1ca13fa /routing/bicycle_directions.cpp
parent2c92557a23c01da9b88b396ac2bdd61ea593d700 (diff)
Review fixes.
Diffstat (limited to 'routing/bicycle_directions.cpp')
-rw-r--r--routing/bicycle_directions.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/routing/bicycle_directions.cpp b/routing/bicycle_directions.cpp
index 2dd184370e..e8e81f19f8 100644
--- a/routing/bicycle_directions.cpp
+++ b/routing/bicycle_directions.cpp
@@ -157,18 +157,22 @@ bool BicycleDirectionsEngine::Generate(RoadGraphBase const & graph, vector<Junct
Route::TStreets & streetNames,
vector<Junction> & routeGeometry, vector<Segment> & segments)
{
+ m_adjacentEdges.clear();
+ m_pathSegments.clear();
+ turns.clear();
+ streetNames.clear();
+ routeGeometry.clear();
+ segments.clear();
+
size_t const pathSize = path.size();
// Note. According to Route::IsValid() method route of zero or one point is invalid.
if (pathSize < 1)
return false;
- m_adjacentEdges.clear();
- m_pathSegments.clear();
-
IRoadGraph::TEdgeVector routeEdges;
if (!ReconstructPath(graph, path, routeEdges, cancellable))
{
- LOG(LWARNING, ("Couldn't reconstruct path."));
+ LOG(LWARNING, ("Can't reconstruct path."));
return false;
}
@@ -186,11 +190,6 @@ bool BicycleDirectionsEngine::Generate(RoadGraphBase const & graph, vector<Junct
RoutingResult resultGraph(routeEdges, m_adjacentEdges, m_pathSegments);
RouterDelegate delegate;
- turns.clear();
- streetNames.clear();
- routeGeometry.clear();
- segments.clear();
-
MakeTurnAnnotation(resultGraph, delegate, routeGeometry, turns, streetNames, segments);
CHECK_EQUAL(routeGeometry.size(), pathSize, ());
// In case of bicycle routing |m_pathSegments| may have an empty