Manual modernize run with LLVM 3.8

More is blocked by:
- https://github.com/Project-OSRM/osrm-backend/issues/2631
This commit is contained in:
Daniel J. Hofmann 2016-07-07 12:45:24 +02:00
parent f4db79fe9b
commit b00b15ab98
7 changed files with 21 additions and 21 deletions

View File

@ -34,7 +34,7 @@ IntersectionHandler::IntersectionHandler(const util::NodeBasedDynamicGraph &node
{ {
} }
IntersectionHandler::~IntersectionHandler() {} IntersectionHandler::~IntersectionHandler() = default;
std::size_t IntersectionHandler::countValid(const Intersection &intersection) const std::size_t IntersectionHandler::countValid(const Intersection &intersection) const
{ {

View File

@ -47,7 +47,7 @@ MotorwayHandler::MotorwayHandler(const util::NodeBasedDynamicGraph &node_based_g
{ {
} }
MotorwayHandler::~MotorwayHandler() {} MotorwayHandler::~MotorwayHandler() = default;
bool MotorwayHandler::canProcess(const NodeID, bool MotorwayHandler::canProcess(const NodeID,
const EdgeID via_eid, const EdgeID via_eid,

View File

@ -31,7 +31,7 @@ RoundaboutHandler::RoundaboutHandler(const util::NodeBasedDynamicGraph &node_bas
{ {
} }
RoundaboutHandler::~RoundaboutHandler() {} RoundaboutHandler::~RoundaboutHandler() = default;
bool RoundaboutHandler::canProcess(const NodeID from_nid, bool RoundaboutHandler::canProcess(const NodeID from_nid,
const EdgeID via_eid, const EdgeID via_eid,

View File

@ -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 bool TurnHandler::canProcess(const NodeID, const EdgeID, const Intersection &) const
{ {

View File

@ -120,7 +120,7 @@ LaneDataVector augmentMultiple(const std::size_t none_index,
} }
} }
lane_data.erase(lane_data.begin() + 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 // 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); lane_data.erase(lane_data.begin() + none_index);
} }
return std::move(lane_data); return lane_data;
} }
LaneDataVector handleRenamingSituations(const std::size_t none_index, 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; lane_data[none_index].tag = TurnLaneType::straight;
} }
} }
return std::move(lane_data); return lane_data;
} }
} // namespace } // namespace
@ -239,7 +239,7 @@ LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data,
(intersection.empty() || lane_data.empty() || !hasTag(TurnLaneType::none, lane_data)); (intersection.empty() || lane_data.empty() || !hasTag(TurnLaneType::none, lane_data));
if (needs_no_processing) 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 // 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 // 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 // finally make sure we are still sorted
std::sort(lane_data.begin(), lane_data.end()); std::sort(lane_data.begin(), lane_data.end());
return std::move(lane_data); return lane_data;
} }
} // namespace lanes } // namespace lanes

View File

@ -65,7 +65,7 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at,
{ {
//if only a uturn exists, there is nothing we can do //if only a uturn exists, there is nothing we can do
if( intersection.size() == 1 ) if( intersection.size() == 1 )
return std::move(intersection); return intersection;
const auto &data = node_based_graph.GetEdgeData(via_edge); const auto &data = node_based_graph.GetEdgeData(via_edge);
// Extract a lane description for the ID // Extract a lane description for the ID
@ -85,19 +85,19 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at,
data.lane_description_id == data.lane_description_id ==
node_based_graph.GetEdgeData(intersection[1].turn.eid).lane_description_id) || node_based_graph.GetEdgeData(intersection[1].turn.eid).lane_description_id) ||
angularDeviation(intersection[1].turn.angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE)) angularDeviation(intersection[1].turn.angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE))
return std::move(intersection); return intersection;
auto lane_data = laneDataFromDescription(turn_lane_description); auto lane_data = laneDataFromDescription(turn_lane_description);
// if we see an invalid conversion, we stop immediately // if we see an invalid conversion, we stop immediately
if (!turn_lane_description.empty() && lane_data.empty()) 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 // 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 // e.g. one direction per lane, if three lanes and right, through, left available
if (!turn_lane_description.empty() && lane_data.size() == 1 && if (!turn_lane_description.empty() && lane_data.size() == 1 &&
lane_data[0].tag == TurnLaneType::none) lane_data[0].tag == TurnLaneType::none)
return std::move(intersection); return intersection;
const std::size_t possible_entries = getNumberOfTurns(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); lane_data.size() + 1 == possible_entries);
if (has_merge_lane || has_non_usable_u_turn) if (has_merge_lane || has_non_usable_u_turn)
return std::move(intersection); return intersection;
if (!lane_data.empty() && canMatchTrivially(intersection, lane_data) && if (!lane_data.empty() && canMatchTrivially(intersection, lane_data) &&
lane_data.size() != lane_data.size() !=
@ -165,7 +165,7 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at,
return handleTurnAtPreviousIntersection(at, via_edge, std::move(intersection), id_map); 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 // 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 // no lane string, no problems
if (previous_lane_description.empty()) if (previous_lane_description.empty())
return std::move(intersection); return intersection;
// stop on invalid lane data conversion // stop on invalid lane data conversion
if (lane_data.empty()) if (lane_data.empty())
return std::move(intersection); return intersection;
const auto &previous_data = node_based_graph.GetEdgeData(previous_id); const auto &previous_data = node_based_graph.GetEdgeData(previous_id);
const auto is_simple = isSimpleIntersection(lane_data, intersection); 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 /* 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 LaneDataIdMap &id_map) const
{ {
if (lane_data.empty() || !canMatchTrivially(intersection, lane_data)) if (lane_data.empty() || !canMatchTrivially(intersection, lane_data))
return std::move(intersection); return intersection;
BOOST_ASSERT( BOOST_ASSERT(
!hasTag(TurnLaneType::none | TurnLaneType::merge_to_left | TurnLaneType::merge_to_right, !hasTag(TurnLaneType::none | TurnLaneType::merge_to_left | TurnLaneType::merge_to_right,

View File

@ -236,7 +236,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
DirectionModifier::SharpLeft) DirectionModifier::SharpLeft)
{ {
// cannot match u-turn in a valid way // cannot match u-turn in a valid way
return std::move(intersection); return intersection;
} }
u_turn = intersection.size() - 1; u_turn = intersection.size() - 1;
} }
@ -246,7 +246,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
matchRoad(intersection[u_turn], lane_data.back()); matchRoad(intersection[u_turn], lane_data.back());
} }
return std::move(intersection); return intersection;
} }
} // namespace lane_matching } // namespace lane_matching