From d0354d460db31fb635ab9e9872d85e7750e65f13 Mon Sep 17 00:00:00 2001 From: Huyen Chau Nguyen Date: Wed, 24 Jan 2018 11:00:03 -0500 Subject: [PATCH] clang-format --- include/util/coordinate.hpp | 6 +++--- src/extractor/edge_based_graph_factory.cpp | 23 +++++++++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/include/util/coordinate.hpp b/include/util/coordinate.hpp index 069fdc2f7e3..defa9478bc0 100644 --- a/include/util/coordinate.hpp +++ b/include/util/coordinate.hpp @@ -34,8 +34,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include //for std::ostream -#include #include +#include #include namespace osrm @@ -262,10 +262,10 @@ struct FloatCoordinate inline std::string toOSMLink() { std::stringstream link; - link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat << "/" << lon; + link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat + << "/" << lon; return link.str(); } - }; bool operator==(const Coordinate lhs, const Coordinate rhs); diff --git a/src/extractor/edge_based_graph_factory.cpp b/src/extractor/edge_based_graph_factory.cpp index 309de56323f..f983209efce 100644 --- a/src/extractor/edge_based_graph_factory.cpp +++ b/src/extractor/edge_based_graph_factory.cpp @@ -811,7 +811,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( auto get_connected_road_info = [&](const auto &connected_edge) { const auto &edge_data = m_node_based_graph.GetEdgeData(connected_edge.eid); - return ExtractionTurnLeg(edge_data.flags.restricted, + return ExtractionTurnLeg( + edge_data.flags.restricted, edge_data.flags.road_classification.IsMotorwayClass(), edge_data.flags.road_classification.IsLinkClass(), edge_data.flags.road_classification.GetNumberOfLanes(), @@ -832,15 +833,27 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( { if (turn != intersection.begin()) { - std::transform(intersection.begin() + 1, turn, std::back_inserter(road_legs_on_the_right), get_connected_road_info); + std::transform(intersection.begin() + 1, + turn, + std::back_inserter(road_legs_on_the_right), + get_connected_road_info); } - std::transform(turn + 1, intersection.end(), std::back_inserter(road_legs_on_the_right), get_connected_road_info); + std::transform(turn + 1, + intersection.end(), + std::back_inserter(road_legs_on_the_right), + get_connected_road_info); } else { - std::transform(intersection.begin() + 1, turn, std::back_inserter(road_legs_on_the_right), get_connected_road_info); - std::transform(turn + 1, intersection.end(), std::back_inserter(road_legs_on_the_left), get_connected_road_info); + std::transform(intersection.begin() + 1, + turn, + std::back_inserter(road_legs_on_the_right), + get_connected_road_info); + std::transform(turn + 1, + intersection.end(), + std::back_inserter(road_legs_on_the_left), + get_connected_road_info); } if (turn->instruction.IsUTurn() && turn != intersection.begin())