Fix formating
This commit is contained in:
committed by
Patrick Niklaus
parent
71cfb03738
commit
b4cfc8d6e0
@@ -519,9 +519,10 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
&scripting_environment,
|
||||
weight_multiplier,
|
||||
&conditional_restriction_map](
|
||||
// what nodes will be used? In most cases this will be the id stored in the edge_data.
|
||||
// In case of duplicated nodes (e.g. due to via-way restrictions), one/both of these
|
||||
// might refer to a newly added edge based node
|
||||
// what nodes will be used? In most cases this will be the id
|
||||
// stored in the edge_data. In case of duplicated nodes (e.g.
|
||||
// due to via-way restrictions), one/both of these might
|
||||
// refer to a newly added edge based node
|
||||
const auto edge_based_node_from,
|
||||
const auto edge_based_node_to,
|
||||
// the situation of the turn
|
||||
|
||||
@@ -186,9 +186,9 @@ void GraphCompressor::Compress(
|
||||
const auto selectAnnotation = [&node_data_container](
|
||||
const AnnotationID front_annotation, const AnnotationID back_annotation) {
|
||||
// A lane has tags: u - (front) - v - (back) - w
|
||||
// During contraction, we keep only one of the tags. Usually the one closer to
|
||||
// the intersection is preferred. If its empty, however, we keep the non-empty
|
||||
// one
|
||||
// During contraction, we keep only one of the tags. Usually the one closer
|
||||
// to the intersection is preferred. If its empty, however, we keep the
|
||||
// non-empty one
|
||||
if (node_data_container[back_annotation].lane_description_id ==
|
||||
INVALID_LANE_DESCRIPTIONID)
|
||||
return front_annotation;
|
||||
|
||||
@@ -115,8 +115,8 @@ std::pair<bool, double> findMergedBearing(const util::NodeBasedDynamicGraph &gra
|
||||
// Function returns a pair with a flag and a value of bearing for merged roads
|
||||
// If the flag is false the bearing must not be used as a merged value at neighbor intersections
|
||||
|
||||
using util::bearing::angleBetween;
|
||||
using util::angularDeviation;
|
||||
using util::bearing::angleBetween;
|
||||
|
||||
const auto &lhs = edge_geometries[lhs_index];
|
||||
const auto &rhs = edge_geometries[rhs_index];
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
using osrm::util::angularDeviation;
|
||||
using osrm::guidance::getTurnDirection;
|
||||
using osrm::util::angularDeviation;
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
||||
@@ -211,9 +211,7 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const
|
||||
std::unordered_set<unsigned> connected_names;
|
||||
|
||||
const auto getNextOnRoundabout = [this, &roundabout_name_ids, &connected_names](
|
||||
const NodeID node,
|
||||
const bool roundabout,
|
||||
const bool circular) {
|
||||
const NodeID node, const bool roundabout, const bool circular) {
|
||||
BOOST_ASSERT(roundabout != circular);
|
||||
EdgeID continue_edge = SPECIAL_EDGEID;
|
||||
for (const auto edge_id : node_based_graph.GetAdjacentEdgeRange(node))
|
||||
|
||||
@@ -70,27 +70,27 @@ LaneDataVector laneDataFromDescription(TurnLaneDescription turn_lane_description
|
||||
// TODO need to handle cases that have none-in between two identical values
|
||||
const auto num_lanes = boost::numeric_cast<LaneID>(turn_lane_description.size());
|
||||
|
||||
const auto setLaneData = [&](
|
||||
LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) {
|
||||
const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool {
|
||||
return (test_mask & full_mask) == test_mask;
|
||||
};
|
||||
const auto setLaneData =
|
||||
[&](LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) {
|
||||
const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool {
|
||||
return (test_mask & full_mask) == test_mask;
|
||||
};
|
||||
|
||||
for (const auto shift : util::irange<std::size_t>(0, TurnLaneType::NUM_TYPES))
|
||||
{
|
||||
TurnLaneType::Mask mask = 1 << shift;
|
||||
if (isSet(mask))
|
||||
for (const auto shift : util::irange<std::size_t>(0, TurnLaneType::NUM_TYPES))
|
||||
{
|
||||
auto map_iterator = map.find(mask);
|
||||
if (map_iterator == map.end())
|
||||
map[mask] = std::make_pair(current_lane, current_lane);
|
||||
else
|
||||
TurnLaneType::Mask mask = 1 << shift;
|
||||
if (isSet(mask))
|
||||
{
|
||||
map_iterator->second.first = current_lane;
|
||||
auto map_iterator = map.find(mask);
|
||||
if (map_iterator == map.end())
|
||||
map[mask] = std::make_pair(current_lane, current_lane);
|
||||
else
|
||||
{
|
||||
map_iterator->second.first = current_lane;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
LaneMap lane_map;
|
||||
LaneID lane_nr = num_lanes - 1;
|
||||
|
||||
@@ -83,8 +83,8 @@ inline unsigned generateServerProgramOptions(const int argc,
|
||||
EngineConfig &config,
|
||||
int &requested_thread_num)
|
||||
{
|
||||
using boost::program_options::value;
|
||||
using boost::filesystem::path;
|
||||
using boost::program_options::value;
|
||||
|
||||
const auto hardware_threads = std::max<int>(1, std::thread::hardware_concurrency());
|
||||
|
||||
|
||||
@@ -42,6 +42,5 @@ bool operator==(const FloatCoordinate lhs, const FloatCoordinate rhs)
|
||||
|
||||
bool operator!=(const Coordinate lhs, const Coordinate rhs) { return !(lhs == rhs); }
|
||||
bool operator!=(const FloatCoordinate lhs, const FloatCoordinate rhs) { return !(lhs == rhs); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ struct opening_hours_grammar : qi::grammar<Iterator, Skipper, std::vector<Openin
|
||||
using qi::_a;
|
||||
using qi::_b;
|
||||
using qi::_c;
|
||||
using qi::_r1;
|
||||
using qi::_pass;
|
||||
using qi::_r1;
|
||||
using qi::_val;
|
||||
using qi::char_;
|
||||
using qi::eoi;
|
||||
using qi::lit;
|
||||
using qi::char_;
|
||||
using qi::uint_;
|
||||
using oh = osrm::util::OpeningHours;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user