From b00b15ab98612c7c3041d0932b3747cb8dcfef17 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Thu, 7 Jul 2016 12:45:24 +0200 Subject: [PATCH] Manual modernize run with LLVM 3.8 More is blocked by: - https://github.com/Project-OSRM/osrm-backend/issues/2631 --- .../guidance/intersection_handler.cpp | 2 +- src/extractor/guidance/motorway_handler.cpp | 2 +- src/extractor/guidance/roundabout_handler.cpp | 2 +- src/extractor/guidance/turn_handler.cpp | 2 +- .../guidance/turn_lane_augmentation.cpp | 10 +++++----- src/extractor/guidance/turn_lane_handler.cpp | 20 +++++++++---------- src/extractor/guidance/turn_lane_matcher.cpp | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/extractor/guidance/intersection_handler.cpp b/src/extractor/guidance/intersection_handler.cpp index 6b0b2fe7a..41023f81b 100644 --- a/src/extractor/guidance/intersection_handler.cpp +++ b/src/extractor/guidance/intersection_handler.cpp @@ -34,7 +34,7 @@ IntersectionHandler::IntersectionHandler(const util::NodeBasedDynamicGraph &node { } -IntersectionHandler::~IntersectionHandler() {} +IntersectionHandler::~IntersectionHandler() = default; std::size_t IntersectionHandler::countValid(const Intersection &intersection) const { diff --git a/src/extractor/guidance/motorway_handler.cpp b/src/extractor/guidance/motorway_handler.cpp index b1269aa67..e08b03454 100644 --- a/src/extractor/guidance/motorway_handler.cpp +++ b/src/extractor/guidance/motorway_handler.cpp @@ -47,7 +47,7 @@ MotorwayHandler::MotorwayHandler(const util::NodeBasedDynamicGraph &node_based_g { } -MotorwayHandler::~MotorwayHandler() {} +MotorwayHandler::~MotorwayHandler() = default; bool MotorwayHandler::canProcess(const NodeID, const EdgeID via_eid, diff --git a/src/extractor/guidance/roundabout_handler.cpp b/src/extractor/guidance/roundabout_handler.cpp index 3a47d6476..df0455b60 100644 --- a/src/extractor/guidance/roundabout_handler.cpp +++ b/src/extractor/guidance/roundabout_handler.cpp @@ -31,7 +31,7 @@ RoundaboutHandler::RoundaboutHandler(const util::NodeBasedDynamicGraph &node_bas { } -RoundaboutHandler::~RoundaboutHandler() {} +RoundaboutHandler::~RoundaboutHandler() = default; bool RoundaboutHandler::canProcess(const NodeID from_nid, const EdgeID via_eid, diff --git a/src/extractor/guidance/turn_handler.cpp b/src/extractor/guidance/turn_handler.cpp index 786412172..ebfa0448c 100644 --- a/src/extractor/guidance/turn_handler.cpp +++ b/src/extractor/guidance/turn_handler.cpp @@ -29,7 +29,7 @@ TurnHandler::TurnHandler(const util::NodeBasedDynamicGraph &node_based_graph, { } -TurnHandler::~TurnHandler() {} +TurnHandler::~TurnHandler() = default; bool TurnHandler::canProcess(const NodeID, const EdgeID, const Intersection &) const { diff --git a/src/extractor/guidance/turn_lane_augmentation.cpp b/src/extractor/guidance/turn_lane_augmentation.cpp index c911583c4..eee972c9f 100644 --- a/src/extractor/guidance/turn_lane_augmentation.cpp +++ b/src/extractor/guidance/turn_lane_augmentation.cpp @@ -120,7 +120,7 @@ LaneDataVector augmentMultiple(const std::size_t none_index, } } lane_data.erase(lane_data.begin() + none_index); - return std::move(lane_data); + return lane_data; } // Merging none-tag into its neighboring fields @@ -146,7 +146,7 @@ LaneDataVector mergeNoneTag(const std::size_t none_index, LaneDataVector lane_da lane_data.erase(lane_data.begin() + none_index); } - return std::move(lane_data); + return lane_data; } LaneDataVector handleRenamingSituations(const std::size_t none_index, @@ -222,7 +222,7 @@ LaneDataVector handleRenamingSituations(const std::size_t none_index, lane_data[none_index].tag = TurnLaneType::straight; } } - return std::move(lane_data); + return lane_data; } } // namespace @@ -239,7 +239,7 @@ LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data, (intersection.empty() || lane_data.empty() || !hasTag(TurnLaneType::none, lane_data)); if (needs_no_processing) - return std::move(lane_data); + return lane_data; // FIXME all this needs to consider the number of lanes at the target to ensure that we // augment lanes correctly, if the target lane allows for more turns @@ -294,7 +294,7 @@ LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data, } // finally make sure we are still sorted std::sort(lane_data.begin(), lane_data.end()); - return std::move(lane_data); + return lane_data; } } // namespace lanes diff --git a/src/extractor/guidance/turn_lane_handler.cpp b/src/extractor/guidance/turn_lane_handler.cpp index 22a9d138d..e1d254474 100644 --- a/src/extractor/guidance/turn_lane_handler.cpp +++ b/src/extractor/guidance/turn_lane_handler.cpp @@ -65,7 +65,7 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at, { //if only a uturn exists, there is nothing we can do if( intersection.size() == 1 ) - return std::move(intersection); + return intersection; const auto &data = node_based_graph.GetEdgeData(via_edge); // Extract a lane description for the ID @@ -85,19 +85,19 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at, data.lane_description_id == node_based_graph.GetEdgeData(intersection[1].turn.eid).lane_description_id) || angularDeviation(intersection[1].turn.angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE)) - return std::move(intersection); + return intersection; auto lane_data = laneDataFromDescription(turn_lane_description); // if we see an invalid conversion, we stop immediately if (!turn_lane_description.empty() && lane_data.empty()) - return std::move(intersection); + return intersection; // might be reasonable to handle multiple turns, if we know of a sequence of lanes // e.g. one direction per lane, if three lanes and right, through, left available if (!turn_lane_description.empty() && lane_data.size() == 1 && lane_data[0].tag == TurnLaneType::none) - return std::move(intersection); + return intersection; const std::size_t possible_entries = getNumberOfTurns(intersection); @@ -114,7 +114,7 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at, lane_data.size() + 1 == possible_entries); if (has_merge_lane || has_non_usable_u_turn) - return std::move(intersection); + return intersection; if (!lane_data.empty() && canMatchTrivially(intersection, lane_data) && lane_data.size() != @@ -165,7 +165,7 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at, return handleTurnAtPreviousIntersection(at, via_edge, std::move(intersection), id_map); } - return std::move(intersection); + return intersection; } // At segregated intersections, turn lanes will often only be specified up until the first turn. To @@ -221,11 +221,11 @@ Intersection TurnLaneHandler::handleTurnAtPreviousIntersection(const NodeID at, // no lane string, no problems if (previous_lane_description.empty()) - return std::move(intersection); + return intersection; // stop on invalid lane data conversion if (lane_data.empty()) - return std::move(intersection); + return intersection; const auto &previous_data = node_based_graph.GetEdgeData(previous_id); const auto is_simple = isSimpleIntersection(lane_data, intersection); @@ -257,7 +257,7 @@ Intersection TurnLaneHandler::handleTurnAtPreviousIntersection(const NodeID at, } } } - return std::move(intersection); + return intersection; } /* A simple intersection does not depend on the next intersection coming up. This is important @@ -522,7 +522,7 @@ Intersection TurnLaneHandler::simpleMatchTuplesToTurns(Intersection intersection LaneDataIdMap &id_map) const { if (lane_data.empty() || !canMatchTrivially(intersection, lane_data)) - return std::move(intersection); + return intersection; BOOST_ASSERT( !hasTag(TurnLaneType::none | TurnLaneType::merge_to_left | TurnLaneType::merge_to_right, diff --git a/src/extractor/guidance/turn_lane_matcher.cpp b/src/extractor/guidance/turn_lane_matcher.cpp index 56b00cec7..7b0d41355 100644 --- a/src/extractor/guidance/turn_lane_matcher.cpp +++ b/src/extractor/guidance/turn_lane_matcher.cpp @@ -236,7 +236,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection, DirectionModifier::SharpLeft) { // cannot match u-turn in a valid way - return std::move(intersection); + return intersection; } u_turn = intersection.size() - 1; } @@ -246,7 +246,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection, matchRoad(intersection[u_turn], lane_data.back()); } - return std::move(intersection); + return intersection; } } // namespace lane_matching