From b0b8069ab030590545ff34e22f06592e64019122 Mon Sep 17 00:00:00 2001 From: themylogin Date: Wed, 27 Jan 2021 13:11:54 +0100 Subject: [PATCH] clang-format --- .../intersection/intersection_analysis.hpp | 17 ++++++------ src/extractor/edge_based_graph_factory.cpp | 21 ++++++++------- .../intersection/intersection_analysis.cpp | 26 ++++++++++--------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/include/extractor/intersection/intersection_analysis.hpp b/include/extractor/intersection/intersection_analysis.hpp index df5f51992ee..aa4a1e939de 100644 --- a/include/extractor/intersection/intersection_analysis.hpp +++ b/include/extractor/intersection/intersection_analysis.hpp @@ -70,14 +70,15 @@ IntersectionView getConnectedRoads(const util::NodeBasedDynamicGraph &graph, const TurnLanesIndexedArray &turn_lanes_data, const IntersectionEdge &incoming_edge); -IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph, - const EdgeBasedNodeDataContainer &node_data_container, - const RestrictionMap &node_restriction_map, - const std::unordered_set &barrier_nodes, - const TurnLanesIndexedArray &turn_lanes_data, - const IntersectionEdge &incoming_edge, - const IntersectionEdgeGeometries &edge_geometries, - const std::unordered_set &merged_edge_ids); +IntersectionView +getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph, + const EdgeBasedNodeDataContainer &node_data_container, + const RestrictionMap &node_restriction_map, + const std::unordered_set &barrier_nodes, + const TurnLanesIndexedArray &turn_lanes_data, + const IntersectionEdge &incoming_edge, + const IntersectionEdgeGeometries &edge_geometries, + const std::unordered_set &merged_edge_ids); // Graph Compression cannot compress every setting. For example any barrier/traffic light cannot // be compressed. As a result, a simple road of the form `a ----- b` might end up as having an diff --git a/src/extractor/edge_based_graph_factory.cpp b/src/extractor/edge_based_graph_factory.cpp index 06a1ce15f7d..7bd359de1bb 100644 --- a/src/extractor/edge_based_graph_factory.cpp +++ b/src/extractor/edge_based_graph_factory.cpp @@ -715,14 +715,15 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( ++node_based_edge_counter; const auto connected_roads = - extractor::intersection::getConnectedRoadsForEdgeGeometries(m_node_based_graph, - m_edge_based_node_container, - unconditional_node_restriction_map, - m_barrier_nodes, - turn_lanes_data, - incoming_edge, - edge_geometries, - merged_edge_ids); + extractor::intersection::getConnectedRoadsForEdgeGeometries( + m_node_based_graph, + m_edge_based_node_container, + unconditional_node_restriction_map, + m_barrier_nodes, + turn_lanes_data, + incoming_edge, + edge_geometries, + merged_edge_ids); // check if this edge is part of a restriction via-way const auto is_restriction_via_edge = @@ -770,8 +771,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( } else { - // It does not add incoming edge if there is outgoing so we should - // find it ourselves + // It does not add incoming edge if there is outgoing so we + // should find it ourselves is_incoming = false; auto reversed_edge = m_node_based_graph.FindEdge( m_node_based_graph.GetTarget(connected_edge.eid), diff --git a/src/extractor/intersection/intersection_analysis.cpp b/src/extractor/intersection/intersection_analysis.cpp index ded594ac6f7..d29d38d0a6f 100644 --- a/src/extractor/intersection/intersection_analysis.cpp +++ b/src/extractor/intersection/intersection_analysis.cpp @@ -755,14 +755,15 @@ IntersectionView getConnectedRoads(const util::NodeBasedDynamicGraph &graph, merged_edge_ids); } -IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph, - const EdgeBasedNodeDataContainer &node_data_container, - const RestrictionMap &node_restriction_map, - const std::unordered_set &barrier_nodes, - const TurnLanesIndexedArray &turn_lanes_data, - const IntersectionEdge &incoming_edge, - const IntersectionEdgeGeometries &edge_geometries, - const std::unordered_set &merged_edge_ids) +IntersectionView +getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph, + const EdgeBasedNodeDataContainer &node_data_container, + const RestrictionMap &node_restriction_map, + const std::unordered_set &barrier_nodes, + const TurnLanesIndexedArray &turn_lanes_data, + const IntersectionEdge &incoming_edge, + const IntersectionEdgeGeometries &edge_geometries, + const std::unordered_set &merged_edge_ids) { const auto intersection_node = graph.GetTarget(incoming_edge.edge); const auto &outgoing_edges = intersection::getOutgoingEdges(graph, intersection_node); @@ -776,10 +777,11 @@ IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamic const auto &geometry = processed_edge_geometries[index]; const auto remote_node = graph.GetTarget(geometry.eid); const auto incoming_edge = graph.FindEdge(remote_node, intersection_node); - processed_edge_geometries[edges_number + index] = {incoming_edge, - util::bearing::reverse(geometry.initial_bearing), - util::bearing::reverse(geometry.perceived_bearing), - geometry.segment_length}; + processed_edge_geometries[edges_number + index] = { + incoming_edge, + util::bearing::reverse(geometry.initial_bearing), + util::bearing::reverse(geometry.perceived_bearing), + geometry.segment_length}; } // Enforce ordering of edges by IDs