Run scripts/format.sh

This commit is contained in:
David Audrain 2017-10-16 10:30:08 -04:00 committed by Patrick Niklaus
parent 1be7dedda7
commit 963c042b2a
2 changed files with 5 additions and 8 deletions

View File

@ -42,15 +42,13 @@ class NearestAPI final : public BaseAPI
auto waypoint = MakeWaypoint(phantom_node);
waypoint.values["distance"] = phantom_with_distance.distance;
util::json::Array nodes;
std::uint64_t from_node = 0;
std::uint64_t to_node = 0;
std::vector<NodeID> forward_geometry;
if (phantom_node.forward_segment_id.enabled )
if (phantom_node.forward_segment_id.enabled)
{
auto segment_id = phantom_node.forward_segment_id.id;
const auto geometry_id = facade.GetGeometryIndex(segment_id).id;
@ -72,7 +70,8 @@ class NearestAPI final : public BaseAPI
geometry[phantom_node.fwd_segment_position + 1]);
from_node = static_cast<std::uint64_t>(osm_node_id);
}
else if (phantom_node.forward_segment_id.enabled && phantom_node.fwd_segment_position > 0)
else if (phantom_node.forward_segment_id.enabled &&
phantom_node.fwd_segment_position > 0)
{
// In the case of one way, rely on forward segment only
auto osm_node_id = facade.GetOSMNodeIDOfNode(

View File

@ -108,10 +108,8 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component)
const auto &nodes = waypoint_object.values.at("nodes").get<json::Array>().values;
BOOST_CHECK(nodes.size() == 2);
BOOST_CHECK(nodes[0].get<util::json::Number>().value !=
0);
BOOST_CHECK(nodes[1].get<util::json::Number>().value !=
0);
BOOST_CHECK(nodes[0].get<util::json::Number>().value != 0);
BOOST_CHECK(nodes[1].get<util::json::Number>().value != 0);
}
}