Skip to content

Commit

Permalink
Routing: simplify code logic of MergeRoute and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
freeHackOfJeff authored and xiaoxq committed Mar 21, 2019
1 parent 0005853 commit 1b6b50a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/routing/core/navigator.cc
Expand Up @@ -60,7 +60,7 @@ bool GetWayNodes(const RoutingRequest& request, const TopoGraph* graph,
for (const auto& point : request.waypoint()) {
const auto* cur_node = graph->GetNode(point.id());
if (cur_node == nullptr) {
AERROR << "Can't find way point in graph! Id: " << point.id();
AERROR << "Cannot find way point in graph! Id: " << point.id();
return false;
}
way_nodes->push_back(cur_node);
Expand Down Expand Up @@ -139,11 +139,10 @@ bool Navigator::MergeRoute(
result_node_vec->push_back(node);
} else {
if (result_node_vec->back().EndS() < node.StartS()) {
AERROR << "Result route is not coninuous";
AERROR << "Result route is not continuous.";
return false;
} else {
result_node_vec->back().SetEndS(node.EndS());
}
result_node_vec->back().SetEndS(node.EndS());
}
}
return true;
Expand Down

0 comments on commit 1b6b50a

Please sign in to comment.