Merge branch 'master' into avoid_samelookup_in_heap_map

This commit is contained in:
xlaussel 2020-11-26 21:29:27 +01:00
commit 687a3cdfbe
368 changed files with 1188 additions and 1151 deletions

View File

@ -62,8 +62,8 @@ matrix:
- npm ci --ignore-scripts - npm ci --ignore-scripts
script: script:
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua - ./scripts/check_taginfo.py taginfo.json profiles/car.lua
- ${MASON} install clang-format 3.8.1 - ${MASON} install clang-format 10.0.0
- PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh - PATH=$(${MASON} prefix clang-format 10.0.0)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
- node ./scripts/validate_changelog.js - node ./scripts/validate_changelog.js
# See issue 4043 # See issue 4043
#- npm run docs && ./scripts/error_on_dirty.sh #- npm run docs && ./scripts/error_on_dirty.sh

View File

@ -94,7 +94,7 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_,
return GraphAndFilter{QueryGraph{num_nodes, std::move(edge_container.edges)}, return GraphAndFilter{QueryGraph{num_nodes, std::move(edge_container.edges)},
edge_container.MakeEdgeFilters()}; edge_container.MakeEdgeFilters()};
} }
} } // namespace contractor
} } // namespace osrm
#endif #endif

View File

@ -164,7 +164,7 @@ struct ContractedEdgeContainer
std::vector<MergedFlags> flags; std::vector<MergedFlags> flags;
std::vector<QueryEdge> edges; std::vector<QueryEdge> edges;
}; };
} } // namespace contractor
} } // namespace osrm
#endif #endif

View File

@ -15,11 +15,11 @@ template <storage::Ownership Ownership> struct ContractedMetric
detail::QueryGraph<Ownership> graph; detail::QueryGraph<Ownership> graph;
std::vector<util::ViewOrVector<bool, Ownership>> edge_filter; std::vector<util::ViewOrVector<bool, Ownership>> edge_filter;
}; };
} } // namespace detail
using ContractedMetric = detail::ContractedMetric<storage::Ownership::Container>; using ContractedMetric = detail::ContractedMetric<storage::Ownership::Container>;
using ContractedMetricView = detail::ContractedMetric<storage::Ownership::View>; using ContractedMetricView = detail::ContractedMetric<storage::Ownership::View>;
} } // namespace contractor
} } // namespace osrm
#endif #endif

View File

@ -49,7 +49,7 @@ class Contractor
private: private:
ContractorConfig config; ContractorConfig config;
}; };
} } // namespace contractor
} } // namespace osrm
#endif // PROCESSING_CHAIN_HPP #endif // PROCESSING_CHAIN_HPP

View File

@ -73,7 +73,7 @@ struct ContractorConfig final : storage::IOConfig
//(e.g. 0.8 contracts 80 percent of the hierarchy, leaving a core of 20%) //(e.g. 0.8 contracts 80 percent of the hierarchy, leaving a core of 20%)
double core_factor; double core_factor;
}; };
} } // namespace contractor
} } // namespace osrm
#endif // EXTRACTOR_OPTIONS_HPP #endif // EXTRACTOR_OPTIONS_HPP

View File

@ -125,7 +125,7 @@ struct RangebasedCRC32
private: private:
IteratorbasedCRC32 crc32; IteratorbasedCRC32 crc32;
}; };
} } // namespace contractor
} } // namespace osrm
#endif /* ITERATOR_BASED_CRC32_H */ #endif /* ITERATOR_BASED_CRC32_H */

View File

@ -52,8 +52,8 @@ inline void writeGraph(const boost::filesystem::path &path,
serialization::write(writer, "/ch/metrics/" + pair.first, pair.second); serialization::write(writer, "/ch/metrics/" + pair.first, pair.second);
} }
} }
} } // namespace files
} } // namespace contractor
} } // namespace osrm
#endif #endif

View File

@ -77,7 +77,7 @@ struct QueryEdge
data.distance == right.data.distance); data.distance == right.data.distance);
} }
}; };
} } // namespace contractor
} } // namespace osrm
#endif // QUERYEDGE_HPP #endif // QUERYEDGE_HPP

View File

@ -19,7 +19,7 @@ using QueryGraph = util::StaticGraph<typename QueryEdge::EdgeData, Ownership>;
using QueryGraph = detail::QueryGraph<storage::Ownership::Container>; using QueryGraph = detail::QueryGraph<storage::Ownership::Container>;
using QueryGraphView = detail::QueryGraph<storage::Ownership::View>; using QueryGraphView = detail::QueryGraph<storage::Ownership::View>;
} } // namespace contractor
} } // namespace osrm
#endif // QUERYEDGE_HPP #endif // QUERYEDGE_HPP

View File

@ -46,8 +46,8 @@ void read(storage::tar::FileReader &reader,
metric.edge_filter[index]); metric.edge_filter[index]);
} }
} }
} } // namespace serialization
} } // namespace contractor
} } // namespace osrm
#endif #endif

View File

@ -212,9 +212,8 @@ class CellCustomizer
} }
const auto &data = graph.GetEdgeData(edge); const auto &data = graph.GetEdgeData(edge);
if (data.forward && if (data.forward && (first_level || partition.GetCell(level - 1, node) !=
(first_level || partition.GetCell(level - 1, to)))
partition.GetCell(level - 1, node) != partition.GetCell(level - 1, to)))
{ {
const EdgeWeight to_weight = weight + data.weight; const EdgeWeight to_weight = weight + data.weight;
const EdgeDuration to_duration = duration + data.duration; const EdgeDuration to_duration = duration + data.duration;
@ -237,7 +236,7 @@ class CellCustomizer
const partitioner::MultiLevelPartition &partition; const partitioner::MultiLevelPartition &partition;
}; };
} } // namespace customizer
} } // namespace osrm
#endif // OSRM_CELLS_CUSTOMIZER_HPP #endif // OSRM_CELLS_CUSTOMIZER_HPP

View File

@ -22,11 +22,11 @@ template <storage::Ownership Ownership> struct CellMetricImpl
Vector<EdgeDuration> durations; Vector<EdgeDuration> durations;
Vector<EdgeDistance> distances; Vector<EdgeDistance> distances;
}; };
} } // namespace detail
using CellMetric = detail::CellMetricImpl<storage::Ownership::Container>; using CellMetric = detail::CellMetricImpl<storage::Ownership::Container>;
using CellMetricView = detail::CellMetricImpl<storage::Ownership::View>; using CellMetricView = detail::CellMetricImpl<storage::Ownership::View>;
} } // namespace customizer
} } // namespace osrm
#endif #endif

View File

@ -39,7 +39,7 @@ struct CustomizationConfig final : storage::IOConfig
updater::UpdaterConfig updater_config; updater::UpdaterConfig updater_config;
}; };
} } // namespace customizer
} } // namespace osrm
#endif // OSRM_CUSTOMIZE_CUSTOMIZER_CONFIG_HPP #endif // OSRM_CUSTOMIZE_CUSTOMIZER_CONFIG_HPP

View File

@ -34,7 +34,7 @@ template <typename EdgeDataT, storage::Ownership Ownership>
void write(storage::tar::FileWriter &writer, void write(storage::tar::FileWriter &writer,
const std::string &name, const std::string &name,
const MultiLevelGraph<EdgeDataT, Ownership> &graph); const MultiLevelGraph<EdgeDataT, Ownership> &graph);
} } // namespace serialization
template <typename EdgeDataT, storage::Ownership Ownership> template <typename EdgeDataT, storage::Ownership Ownership>
class MultiLevelGraph : public partitioner::MultiLevelGraph<EdgeDataT, Ownership> class MultiLevelGraph : public partitioner::MultiLevelGraph<EdgeDataT, Ownership>
@ -126,7 +126,7 @@ using MultiLevelEdgeBasedGraph =
MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::Container>; MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::Container>;
using MultiLevelEdgeBasedGraphView = using MultiLevelEdgeBasedGraphView =
MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::View>; MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::View>;
} } // namespace customizer
} } // namespace osrm
#endif #endif

View File

@ -106,8 +106,8 @@ inline void writeGraph(const boost::filesystem::path &path,
writer.WriteFrom("/mld/connectivity_checksum", connectivity_checksum); writer.WriteFrom("/mld/connectivity_checksum", connectivity_checksum);
serialization::write(writer, "/mld/multilevelgraph", graph); serialization::write(writer, "/mld/multilevelgraph", graph);
} }
} } // namespace files
} } // namespace customizer
} } // namespace osrm
#endif #endif

View File

@ -65,8 +65,8 @@ inline void write(storage::tar::FileWriter &writer,
storage::serialization::write(writer, name + "/is_backward_edge", graph.is_backward_edge); storage::serialization::write(writer, name + "/is_backward_edge", graph.is_backward_edge);
storage::serialization::write(writer, name + "/node_to_edge_offset", graph.node_to_edge_offset); storage::serialization::write(writer, name + "/node_to_edge_offset", graph.node_to_edge_offset);
} }
} } // namespace serialization
} } // namespace customizer
} } // namespace osrm
#endif #endif

View File

@ -16,14 +16,14 @@ namespace ch
struct Algorithm final struct Algorithm final
{ {
}; };
} } // namespace ch
// Multi-Level Dijkstra // Multi-Level Dijkstra
namespace mld namespace mld
{ {
struct Algorithm final struct Algorithm final
{ {
}; };
} } // namespace mld
// Algorithm names // Algorithm names
template <typename AlgorithmT> const char *name(); template <typename AlgorithmT> const char *name();
@ -111,8 +111,8 @@ template <> struct HasGetTileTurns<mld::Algorithm> final : std::true_type
template <> struct HasExcludeFlags<mld::Algorithm> final : std::true_type template <> struct HasExcludeFlags<mld::Algorithm> final : std::true_type
{ {
}; };
} } // namespace routing_algorithms
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -128,8 +128,8 @@ class BaseAPI
const BaseParameters &parameters; const BaseParameters &parameters;
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -124,8 +124,8 @@ struct BaseParameters
}); });
} }
}; };
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif // ROUTE_PARAMETERS_HPP #endif // ROUTE_PARAMETERS_HPP

View File

@ -16,8 +16,8 @@ namespace api
{ {
using ResultT = using ResultT =
mapbox::util::variant<util::json::Object, std::string, flatbuffers::FlatBufferBuilder>; mapbox::util::variant<util::json::Object, std::string, flatbuffers::FlatBufferBuilder>;
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -112,8 +112,8 @@ util::json::Object makeRouteLeg(guidance::RouteLeg leg, util::json::Array steps)
util::json::Array makeRouteLegs(std::vector<guidance::RouteLeg> legs, util::json::Array makeRouteLegs(std::vector<guidance::RouteLeg> legs,
std::vector<util::json::Value> step_geometries, std::vector<util::json::Value> step_geometries,
std::vector<util::json::Object> annotations); std::vector<util::json::Object> annotations);
} } // namespace json
} } // namespace api
} // namespace engine } // namespace engine
} // namespace osrm } // namespace osrm

View File

@ -248,8 +248,8 @@ class MatchAPI final : public RouteAPI
const tidy::Result &tidy_result; const tidy::Result &tidy_result;
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -79,8 +79,9 @@ struct MatchParameters : public RouteParameters
bool tidy_, bool tidy_,
std::vector<std::size_t> waypoints_, std::vector<std::size_t> waypoints_,
Args... args_) Args... args_)
: RouteParameters{std::forward<Args>(args_)..., waypoints_}, : RouteParameters{std::forward<Args>(args_)..., waypoints_}, timestamps{std::move(
timestamps{std::move(timestamps_)}, gaps(gaps_), tidy(tidy_) timestamps_)},
gaps(gaps_), tidy(tidy_)
{ {
} }
@ -94,8 +95,8 @@ struct MatchParameters : public RouteParameters
(timestamps.empty() || timestamps.size() == coordinates.size()); (timestamps.empty() || timestamps.size() == coordinates.size());
} }
}; };
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -200,9 +200,9 @@ inline Result tidy(const MatchParameters &params, Thresholds cfg = {15., 5})
return result; return result;
} }
} // ns tidy } // namespace tidy
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -159,8 +159,8 @@ class NearestAPI final : public BaseAPI
} }
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -52,8 +52,8 @@ struct NearestParameters : public BaseParameters
bool IsValid() const { return BaseParameters::IsValid() && number_of_results >= 1; } bool IsValid() const { return BaseParameters::IsValid() && number_of_results >= 1; }
}; };
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif // ENGINE_API_NEAREST_PARAMETERS_HPP #endif // ENGINE_API_NEAREST_PARAMETERS_HPP

View File

@ -988,8 +988,8 @@ class RouteAPI : public BaseAPI
} }
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -90,16 +90,10 @@ struct RouteParameters : public BaseParameters
Args... args_) Args... args_)
// Once we perfectly-forward `args` (see #2990) this constructor can delegate to the one // Once we perfectly-forward `args` (see #2990) this constructor can delegate to the one
// below. // below.
: BaseParameters{std::forward<Args>(args_)...}, : BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
steps{steps_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{false},
alternatives{alternatives_}, annotations_type{AnnotationsType::None}, geometries{geometries_}, overview{overview_},
number_of_alternatives{alternatives_ ? 1u : 0u}, continue_straight{continue_straight_}, waypoints()
annotations{false},
annotations_type{AnnotationsType::None},
geometries{geometries_},
overview{overview_},
continue_straight{continue_straight_},
waypoints()
{ {
} }
@ -151,8 +145,8 @@ struct RouteParameters : public BaseParameters
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_}, : BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_},
annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None}, annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None},
geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_}, geometries{geometries_}, overview{overview_},
waypoints{waypoints_} continue_straight{continue_straight_}, waypoints{waypoints_}
{ {
} }
@ -217,8 +211,8 @@ inline RouteParameters::AnnotationsType operator|=(RouteParameters::AnnotationsT
{ {
return lhs = lhs | rhs; return lhs = lhs | rhs;
} }
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -407,8 +407,8 @@ class TableAPI final : public BaseAPI
const TableParameters &parameters; const TableParameters &parameters;
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -166,8 +166,8 @@ inline TableParameters::AnnotationsType &operator|=(TableParameters::Annotations
{ {
return lhs = lhs | rhs; return lhs = lhs | rhs;
} }
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif // ENGINE_API_TABLE_PARAMETERS_HPP #endif // ENGINE_API_TABLE_PARAMETERS_HPP

View File

@ -70,8 +70,8 @@ struct TileParameters final
return valid_x && valid_y && valid_z; return valid_x && valid_y && valid_z;
} }
}; };
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -175,8 +175,8 @@ class TripAPI final : public RouteAPI
const TripParameters &parameters; const TripParameters &parameters;
}; };
} // ns api } // namespace api
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -65,8 +65,8 @@ struct TripParameters : public RouteParameters
DestinationType destination_, DestinationType destination_,
bool roundtrip_, bool roundtrip_,
Args &&... args_) Args &&... args_)
: RouteParameters{std::forward<Args>(args_)...}, source{source_}, destination{destination_}, : RouteParameters{std::forward<Args>(args_)...}, source{source_},
roundtrip{roundtrip_} destination{destination_}, roundtrip{roundtrip_}
{ {
} }
@ -76,8 +76,8 @@ struct TripParameters : public RouteParameters
bool IsValid() const { return RouteParameters::IsValid(); } bool IsValid() const { return RouteParameters::IsValid(); }
}; };
} } // namespace api
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -42,5 +42,5 @@ enum class Approach : std::uint8_t
}; };
} }
} } // namespace osrm
#endif #endif

View File

@ -38,7 +38,7 @@ using BinaryFromBase64 = boost::archive::iterators::transform_width<
8, // get a view of 8 bit 8, // get a view of 8 bit
6 // from a sequence of 6 bit 6 // from a sequence of 6 bit
>; >;
} // ns detail } // namespace detail
namespace engine namespace engine
{ {
@ -135,7 +135,7 @@ template <typename T> T decodeBase64Bytewise(const std::string &encoded)
return x; return x;
} }
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif /* OSRM_BASE64_HPP */ #endif /* OSRM_BASE64_HPP */

View File

@ -46,7 +46,7 @@ inline bool operator==(const Bearing lhs, const Bearing rhs)
return lhs.bearing == rhs.bearing && lhs.range == rhs.range; return lhs.bearing == rhs.bearing && lhs.range == rhs.range;
} }
inline bool operator!=(const Bearing lhs, const Bearing rhs) { return !(lhs == rhs); } inline bool operator!=(const Bearing lhs, const Bearing rhs) { return !(lhs == rhs); }
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -142,14 +142,14 @@ class DataWatchdogImpl<AlgorithmT, datafacade::ContiguousInternalMemoryDataFacad
storage::SharedRegion *updatable_shared_region; storage::SharedRegion *updatable_shared_region;
DataFacadeFactory<datafacade::ContiguousInternalMemoryDataFacade, AlgorithmT> facade_factory; DataFacadeFactory<datafacade::ContiguousInternalMemoryDataFacade, AlgorithmT> facade_factory;
}; };
} } // namespace detail
// This class monitors the shared memory region that contains the pointers to // This class monitors the shared memory region that contains the pointers to
// the data and layout regions that should be used. This region is updated // the data and layout regions that should be used. This region is updated
// once a new dataset arrives. // once a new dataset arrives.
template <typename AlgorithmT, template <typename A> class FacadeT> template <typename AlgorithmT, template <typename A> class FacadeT>
using DataWatchdog = detail::DataWatchdogImpl<AlgorithmT, FacadeT<AlgorithmT>>; using DataWatchdog = detail::DataWatchdogImpl<AlgorithmT, FacadeT<AlgorithmT>>;
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -11,7 +11,7 @@ namespace engine
using DataFacadeBase = datafacade::ContiguousInternalMemoryDataFacadeBase; using DataFacadeBase = datafacade::ContiguousInternalMemoryDataFacadeBase;
template <typename AlgorithmT> template <typename AlgorithmT>
using DataFacade = datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT>; using DataFacade = datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT>;
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -99,8 +99,8 @@ template <> class AlgorithmDataFacade<MLD>
// searches for a specific edge // searches for a specific edge
virtual EdgeID FindEdge(const NodeID from, const NodeID to) const = 0; virtual EdgeID FindEdge(const NodeID from, const NodeID to) const = 0;
}; };
} } // namespace datafacade
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -609,7 +609,7 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
auto found_range = std::equal_range( auto found_range = std::equal_range(
m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{}); m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{});
std::for_each(found_range.first, found_range.second, [&](const auto & override) { std::for_each(found_range.first, found_range.second, [&](const auto &override) {
std::vector<NodeID> sequence( std::vector<NodeID> sequence(
m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_begin, m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_begin,
m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_end); m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_end);
@ -760,8 +760,8 @@ class ContiguousInternalMemoryDataFacade<MLD> final
{ {
} }
}; };
} } // namespace datafacade
} } // namespace engine
} } // namespace osrm
#endif // CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP #endif // CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP

View File

@ -223,8 +223,8 @@ class BaseDataFacade
virtual std::vector<extractor::ManeuverOverride> virtual std::vector<extractor::ManeuverOverride>
GetOverridesThatStartAt(const NodeID edge_based_node_id) const = 0; GetOverridesThatStartAt(const NodeID edge_based_node_id) const = 0;
}; };
} } // namespace datafacade
} } // namespace engine
} } // namespace osrm
#endif // DATAFACADE_BASE_HPP #endif // DATAFACADE_BASE_HPP

View File

@ -152,7 +152,7 @@ template <template <typename A> class FacadeT, typename AlgorithmT> class DataFa
std::unordered_map<std::string, extractor::ClassData> name_to_class; std::unordered_map<std::string, extractor::ClassData> name_to_class;
const extractor::ProfileProperties *properties = nullptr; const extractor::ProfileProperties *properties = nullptr;
}; };
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -93,7 +93,7 @@ class WatchingProvider : public DataFacadeProvider<AlgorithmT, FacadeT>
return watchdog.Get(params); return watchdog.Get(params);
} }
}; };
} } // namespace detail
template <typename AlgorithmT> template <typename AlgorithmT>
using DataFacadeProvider = detail::DataFacadeProvider<AlgorithmT, DataFacade>; using DataFacadeProvider = detail::DataFacadeProvider<AlgorithmT, DataFacade>;
@ -103,7 +103,7 @@ template <typename AlgorithmT>
using ImmutableProvider = detail::ImmutableProvider<AlgorithmT, DataFacade>; using ImmutableProvider = detail::ImmutableProvider<AlgorithmT, DataFacade>;
template <typename AlgorithmT> template <typename AlgorithmT>
using ExternalProvider = detail::ExternalProvider<AlgorithmT, DataFacade>; using ExternalProvider = detail::ExternalProvider<AlgorithmT, DataFacade>;
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -57,7 +57,7 @@ const constexpr std::uint64_t DOUGLAS_PEUCKER_THRESHOLDS[19] = {
const constexpr auto DOUGLAS_PEUCKER_THRESHOLDS_SIZE = const constexpr auto DOUGLAS_PEUCKER_THRESHOLDS_SIZE =
sizeof(DOUGLAS_PEUCKER_THRESHOLDS) / sizeof(*DOUGLAS_PEUCKER_THRESHOLDS); sizeof(DOUGLAS_PEUCKER_THRESHOLDS) / sizeof(*DOUGLAS_PEUCKER_THRESHOLDS);
} // ns detail } // namespace detail
// These functions compute the bitvector of indicating generalized input // These functions compute the bitvector of indicating generalized input
// points according to the (Ramer-)Douglas-Peucker algorithm. // points according to the (Ramer-)Douglas-Peucker algorithm.
@ -75,7 +75,7 @@ inline std::vector<util::Coordinate> douglasPeucker(const std::vector<util::Coor
{ {
return douglasPeucker(begin(geometry), end(geometry), zoom_level); return douglasPeucker(begin(geometry), end(geometry), zoom_level);
} }
} } // namespace engine
} } // namespace osrm
#endif /* DOUGLAS_PEUCKER_HPP_ */ #endif /* DOUGLAS_PEUCKER_HPP_ */

View File

@ -130,7 +130,7 @@ template <typename Algorithm> class Engine final : public EngineInterface
const plugins::MatchPlugin match_plugin; const plugins::MatchPlugin match_plugin;
const plugins::TilePlugin tile_plugin; const plugins::TilePlugin tile_plugin;
}; };
} } // namespace engine
} } // namespace osrm
#endif // OSRM_IMPL_HPP #endif // OSRM_IMPL_HPP

View File

@ -94,7 +94,7 @@ struct EngineConfig final
std::string verbosity; std::string verbosity;
std::string dataset_name; std::string dataset_name;
}; };
} } // namespace engine
} } // namespace osrm
#endif // SERVER_CONFIG_HPP #endif // SERVER_CONFIG_HPP

View File

@ -715,7 +715,7 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
const CoordinateList &coordinates; const CoordinateList &coordinates;
DataFacadeT &datafacade; DataFacadeT &datafacade;
}; };
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -167,8 +167,8 @@ inline LegGeometry assembleGeometry(const datafacade::BaseDataFacade &facade,
return geometry; return geometry;
} }
} } // namespace guidance
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -122,7 +122,7 @@ std::array<std::uint32_t, SegmentNumber> summarizeRoute(const datafacade::BaseDa
[](const NamedSegment &segment) { return segment.name_id; }); [](const NamedSegment &segment) { return segment.name_id; });
return summary; return summary;
} }
} } // namespace detail
inline RouteLeg assembleLeg(const datafacade::BaseDataFacade &facade, inline RouteLeg assembleLeg(const datafacade::BaseDataFacade &facade,
const std::vector<PathData> &route_data, const std::vector<PathData> &route_data,

View File

@ -35,7 +35,7 @@ std::pair<short, short> getDepartBearings(const LegGeometry &leg_geometry,
std::pair<short, short> getArriveBearings(const LegGeometry &leg_geometry, std::pair<short, short> getArriveBearings(const LegGeometry &leg_geometry,
const PhantomNode &target_node, const PhantomNode &target_node,
const bool traversed_in_reverse); const bool traversed_in_reverse);
} // ns detail } // namespace detail
inline std::vector<RouteStep> assembleSteps(const datafacade::BaseDataFacade &facade, inline std::vector<RouteStep> assembleSteps(const datafacade::BaseDataFacade &facade,
const std::vector<PathData> &leg_data, const std::vector<PathData> &leg_data,

View File

@ -163,7 +163,7 @@ void combineRouteSteps(RouteStep &step_at_turn_location,
void suppressStep(RouteStep &step_at_turn_location, RouteStep &step_after_turn_location); void suppressStep(RouteStep &step_at_turn_location, RouteStep &step_after_turn_location);
} /* namespace guidance */ } /* namespace guidance */
} /* namespace osrm */ } // namespace engine
} /* namespace osrm */ } /* namespace osrm */
#endif /* OSRM_ENGINE_GUIDANCE_COLLAPSE_HPP_ */ #endif /* OSRM_ENGINE_GUIDANCE_COLLAPSE_HPP_ */

View File

@ -64,8 +64,8 @@ struct LegGeometry
return segment_offsets.size() - 1; return segment_offsets.size() - 1;
} }
}; };
} } // namespace guidance
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -14,8 +14,8 @@ struct Route
double duration; double duration;
double weight; double weight;
}; };
} } // namespace guidance
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -23,8 +23,8 @@ struct RouteLeg
std::string summary; std::string summary;
std::vector<RouteStep> steps; std::vector<RouteStep> steps;
}; };
} } // namespace guidance
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -46,5 +46,5 @@ inline StepManeuver getInvalidStepManeuver()
} // namespace guidance } // namespace guidance
} // namespace engine } // namespace engine
} // namespace osrmn } // namespace osrm
#endif #endif

View File

@ -67,7 +67,7 @@ static_assert(sizeof(Hint) == 80 + 4, "Hint is bigger than expected");
constexpr std::size_t ENCODED_HINT_SIZE = 112; constexpr std::size_t ENCODED_HINT_SIZE = 112;
static_assert(ENCODED_HINT_SIZE / 4 * 3 >= sizeof(Hint), static_assert(ENCODED_HINT_SIZE / 4 * 3 >= sizeof(Hint),
"ENCODED_HINT_SIZE does not match size of Hint"); "ENCODED_HINT_SIZE does not match size of Hint");
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -173,7 +173,7 @@ inline InternalRouteResult CollapseInternalRouteResult(const InternalRouteResult
collapsed.unpacked_path_segments.size()); collapsed.unpacked_path_segments.size());
return collapsed; return collapsed;
} }
} } // namespace engine
} } // namespace osrm
#endif // RAW_ROUTE_DATA_H #endif // RAW_ROUTE_DATA_H

View File

@ -98,8 +98,8 @@ class BayesClassifier
double positive_apriori_probability; double positive_apriori_probability;
double negative_apriori_probability; double negative_apriori_probability;
}; };
} } // namespace map_matching
} } // namespace engine
} } // namespace osrm
#endif // BAYES_CLASSIFIER_HPP #endif // BAYES_CLASSIFIER_HPP

View File

@ -137,8 +137,8 @@ template <class CandidateLists> struct HiddenMarkovModel
return initial_timestamp; return initial_timestamp;
} }
}; };
} } // namespace map_matching
} } // namespace engine
} } // namespace osrm
#endif // HIDDEN_MARKOV_MODEL #endif // HIDDEN_MARKOV_MODEL

View File

@ -51,8 +51,8 @@ struct MatchingConfidence
private: private:
ClassifierT classifier; ClassifierT classifier;
}; };
} } // namespace map_matching
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -19,8 +19,8 @@ struct SubMatching
std::vector<unsigned> alternatives_count; std::vector<unsigned> alternatives_count;
double confidence; double confidence;
}; };
} } // namespace map_matching
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -44,14 +44,15 @@ namespace engine
struct PhantomNode struct PhantomNode
{ {
PhantomNode() PhantomNode()
: forward_segment_id{SPECIAL_SEGMENTID, false}, : forward_segment_id{SPECIAL_SEGMENTID, false}, reverse_segment_id{SPECIAL_SEGMENTID,
reverse_segment_id{SPECIAL_SEGMENTID, false}, forward_weight(INVALID_EDGE_WEIGHT), false},
reverse_weight(INVALID_EDGE_WEIGHT), forward_weight_offset(0), reverse_weight_offset(0), forward_weight(INVALID_EDGE_WEIGHT), reverse_weight(INVALID_EDGE_WEIGHT),
forward_weight_offset(0), reverse_weight_offset(0),
forward_distance(INVALID_EDGE_DISTANCE), reverse_distance(INVALID_EDGE_DISTANCE), forward_distance(INVALID_EDGE_DISTANCE), reverse_distance(INVALID_EDGE_DISTANCE),
forward_distance_offset(0), reverse_distance_offset(0), forward_distance_offset(0), reverse_distance_offset(0),
forward_duration(MAXIMAL_EDGE_DURATION), reverse_duration(MAXIMAL_EDGE_DURATION), forward_duration(MAXIMAL_EDGE_DURATION), reverse_duration(MAXIMAL_EDGE_DURATION),
forward_duration_offset(0), reverse_duration_offset(0), fwd_segment_position(0), forward_duration_offset(0), reverse_duration_offset(0),
is_valid_forward_source{false}, is_valid_forward_target{false}, fwd_segment_position(0), is_valid_forward_source{false}, is_valid_forward_target{false},
is_valid_reverse_source{false}, is_valid_reverse_target{false}, bearing(0) is_valid_reverse_source{false}, is_valid_reverse_target{false}, bearing(0)
{ {
@ -109,8 +110,9 @@ struct PhantomNode
bool IsValid(const unsigned number_of_nodes) const bool IsValid(const unsigned number_of_nodes) const
{ {
return location.IsValid() && ((forward_segment_id.id < number_of_nodes) || return location.IsValid() &&
(reverse_segment_id.id < number_of_nodes)) && ((forward_segment_id.id < number_of_nodes) ||
(reverse_segment_id.id < number_of_nodes)) &&
((forward_weight != INVALID_EDGE_WEIGHT) || ((forward_weight != INVALID_EDGE_WEIGHT) ||
(reverse_weight != INVALID_EDGE_WEIGHT)) && (reverse_weight != INVALID_EDGE_WEIGHT)) &&
((forward_duration != MAXIMAL_EDGE_DURATION) || ((forward_duration != MAXIMAL_EDGE_DURATION) ||
@ -234,7 +236,7 @@ struct PhantomNodes
PhantomNode source_phantom; PhantomNode source_phantom;
PhantomNode target_phantom; PhantomNode target_phantom;
}; };
} } // namespace engine
} } // namespace osrm
#endif // PHANTOM_NODES_H #endif // PHANTOM_NODES_H

View File

@ -38,8 +38,8 @@ class MatchPlugin : public BasePlugin
const int max_locations_map_matching; const int max_locations_map_matching;
const double max_radius_map_matching; const double max_radius_map_matching;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif // MATCH_HPP #endif // MATCH_HPP

View File

@ -26,8 +26,8 @@ class NearestPlugin final : public BasePlugin
private: private:
const int max_results; const int max_results;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif /* NEAREST_HPP */ #endif /* NEAREST_HPP */

View File

@ -131,8 +131,10 @@ class BasePlugin
return phantom_pair.first; return phantom_pair.first;
}; };
const auto use_closed_phantom = []( const auto use_closed_phantom =
const std::pair<PhantomNode, PhantomNode> &phantom_pair) { return phantom_pair.first; }; [](const std::pair<PhantomNode, PhantomNode> &phantom_pair) {
return phantom_pair.first;
};
const bool every_phantom_is_in_tiny_cc = std::all_of(std::begin(phantom_node_pair_list), const bool every_phantom_is_in_tiny_cc = std::all_of(std::begin(phantom_node_pair_list),
std::end(phantom_node_pair_list), std::end(phantom_node_pair_list),
@ -388,8 +390,8 @@ class BasePlugin
std::to_string(missing_index); std::to_string(missing_index);
} }
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif /* BASE_PLUGIN_HPP */ #endif /* BASE_PLUGIN_HPP */

View File

@ -27,8 +27,8 @@ class TablePlugin final : public BasePlugin
private: private:
const int max_locations_distance_table; const int max_locations_distance_table;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif // TABLE_HPP #endif // TABLE_HPP

View File

@ -30,8 +30,8 @@ class TilePlugin final : public BasePlugin
const api::TileParameters &parameters, const api::TileParameters &parameters,
osrm::engine::api::ResultT &pbf_buffer) const; osrm::engine::api::ResultT &pbf_buffer) const;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif /* TILEPLUGIN_HPP */ #endif /* TILEPLUGIN_HPP */

View File

@ -42,8 +42,8 @@ class TripPlugin final : public BasePlugin
const api::TripParameters &parameters, const api::TripParameters &parameters,
osrm::engine::api::ResultT &json_result) const; osrm::engine::api::ResultT &json_result) const;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif // TRIP_HPP #endif // TRIP_HPP

View File

@ -35,8 +35,8 @@ class ViaRoutePlugin final : public BasePlugin
const api::RouteParameters &route_parameters, const api::RouteParameters &route_parameters,
osrm::engine::api::ResultT &json_result) const; osrm::engine::api::ResultT &json_result) const;
}; };
} } // namespace plugins
} } // namespace engine
} } // namespace osrm
#endif // VIA_ROUTE_HPP #endif // VIA_ROUTE_HPP

View File

@ -17,7 +17,7 @@ namespace detail
std::string encode(std::vector<int> &numbers); std::string encode(std::vector<int> &numbers);
std::int32_t decode_polyline_integer(std::string::const_iterator &first, std::int32_t decode_polyline_integer(std::string::const_iterator &first,
std::string::const_iterator last); std::string::const_iterator last);
} } // namespace detail
using CoordVectorForwardIter = std::vector<util::Coordinate>::const_iterator; using CoordVectorForwardIter = std::vector<util::Coordinate>::const_iterator;
// Encodes geometry into polyline format. // Encodes geometry into polyline format.
// See: https://developers.google.com/maps/documentation/utilities/polylinealgorithm // See: https://developers.google.com/maps/documentation/utilities/polylinealgorithm
@ -80,7 +80,7 @@ std::vector<util::Coordinate> decodePolyline(const std::string &polyline)
} }
return coordinates; return coordinates;
} }
} } // namespace engine
} } // namespace osrm
#endif /* POLYLINECOMPRESSOR_H_ */ #endif /* POLYLINECOMPRESSOR_H_ */

View File

@ -230,7 +230,7 @@ inline std::vector<routing_algorithms::TurnData> RoutingAlgorithms<Algorithm>::G
return routing_algorithms::getTileTurns(*facade, edges, sorted_edge_indexes); return routing_algorithms::getTileTurns(*facade, edges, sorted_edge_indexes);
} }
} // ns engine } // namespace engine
} // ns osrm } // namespace osrm
#endif #endif

View File

@ -226,7 +226,7 @@ inline void initializeHeap<mld::Algorithm>(SearchEngineData<mld::Algorithm> &eng
const auto border_nodes_number = facade.GetMaxBorderNodeID() + 1; const auto border_nodes_number = facade.GetMaxBorderNodeID() + 1;
engine_working_data.InitializeOrClearFirstThreadLocalStorage(nodes_number, border_nodes_number); engine_working_data.InitializeOrClearFirstThreadLocalStorage(nodes_number, border_nodes_number);
} }
} } // namespace
template <typename Algorithm> template <typename Algorithm>
InternalRouteResult shortestPathSearch(SearchEngineData<Algorithm> &engine_working_data, InternalRouteResult shortestPathSearch(SearchEngineData<Algorithm> &engine_working_data,

View File

@ -120,7 +120,7 @@ template <> struct SearchEngineData<routing_algorithms::mld::Algorithm>
void InitializeOrClearManyToManyThreadLocalStorage(unsigned number_of_nodes, void InitializeOrClearManyToManyThreadLocalStorage(unsigned number_of_nodes,
unsigned number_of_boundary_nodes); unsigned number_of_boundary_nodes);
}; };
} } // namespace engine
} } // namespace osrm
#endif // SEARCH_ENGINE_DATA_HPP #endif // SEARCH_ENGINE_DATA_HPP

View File

@ -42,7 +42,7 @@ enum class Status
Ok, Ok,
Error Error
}; };
} } // namespace engine
} } // namespace osrm
#endif #endif

View File

@ -92,8 +92,8 @@ std::vector<NodeID> NearestNeighbourTrip(const NodeIDIterator &start,
} }
return route; return route;
} }
} } // namespace trip
} } // namespace engine
} } // namespace osrm
#endif // TRIP_NEAREST_NEIGHBOUR_HPP #endif // TRIP_NEAREST_NEIGHBOUR_HPP

View File

@ -33,7 +33,7 @@ inline bool isValidClassName(const std::string &name)
return std::isalnum(c); return std::isalnum(c);
}) == name.end(); }) == name.end();
} }
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -82,7 +82,7 @@ class CompressedEdgeContainer
std::unordered_map<EdgeID, unsigned> m_reverse_edge_id_to_zipped_index_map; std::unordered_map<EdgeID, unsigned> m_reverse_edge_id_to_zipped_index_map;
std::unique_ptr<SegmentDataContainer> segment_data; std::unique_ptr<SegmentDataContainer> segment_data;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // GEOMETRY_COMPRESSOR_HPP_ #endif // GEOMETRY_COMPRESSOR_HPP_

View File

@ -14,7 +14,7 @@ struct CompressedNodeBasedGraphEdge
NodeID source; NodeID source;
NodeID target; NodeID target;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP #endif // OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP

View File

@ -42,7 +42,7 @@ class Datasources
std::array<std::uint32_t, MAX_NUM_SOURES> lengths; std::array<std::uint32_t, MAX_NUM_SOURES> lengths;
std::array<char, MAX_LENGTH_NAME * MAX_NUM_SOURES> sources; std::array<char, MAX_LENGTH_NAME * MAX_NUM_SOURES> sources;
}; };
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -96,7 +96,7 @@ inline bool EdgeBasedEdge::operator<(const EdgeBasedEdge &other) const
return std::tie(source, target, data.weight, unidirectional) < return std::tie(source, target, data.weight, unidirectional) <
std::tie(other.source, other.target, other.data.weight, other_is_unidirectional); std::tie(other.source, other.target, other.data.weight, other_is_unidirectional);
} }
} // ns extractor } // namespace extractor
} // ns osrm } // namespace osrm
#endif /* EDGE_BASED_EDGE_HPP */ #endif /* EDGE_BASED_EDGE_HPP */

View File

@ -54,7 +54,7 @@ struct TurnIndexBlock
#pragma pack(pop) #pragma pack(pop)
static_assert(std::is_trivial<TurnIndexBlock>::value, "TurnIndexBlock is not trivial"); static_assert(std::is_trivial<TurnIndexBlock>::value, "TurnIndexBlock is not trivial");
static_assert(sizeof(TurnIndexBlock) == 12, "TurnIndexBlock is not packed correctly"); static_assert(sizeof(TurnIndexBlock) == 12, "TurnIndexBlock is not packed correctly");
} // ns lookup } // namespace lookup
struct NodeBasedGraphToEdgeBasedGraphMappingWriter; // fwd. decl struct NodeBasedGraphToEdgeBasedGraphMappingWriter; // fwd. decl

View File

@ -20,8 +20,9 @@ namespace extractor
struct EdgeBasedNodeSegment struct EdgeBasedNodeSegment
{ {
EdgeBasedNodeSegment() EdgeBasedNodeSegment()
: forward_segment_id{SPECIAL_SEGMENTID, false}, : forward_segment_id{SPECIAL_SEGMENTID, false}, reverse_segment_id{SPECIAL_SEGMENTID,
reverse_segment_id{SPECIAL_SEGMENTID, false}, u(SPECIAL_NODEID), v(SPECIAL_NODEID), false},
u(SPECIAL_NODEID), v(SPECIAL_NODEID),
fwd_segment_position(std::numeric_limits<unsigned short>::max() >> fwd_segment_position(std::numeric_limits<unsigned short>::max() >>
1), // >> 1 because we've only got 15 bits 1), // >> 1 because we've only got 15 bits
is_startpoint(false) is_startpoint(false)
@ -47,7 +48,7 @@ struct EdgeBasedNodeSegment
unsigned short fwd_segment_position : 15; // segment id in a compressed geometry unsigned short fwd_segment_position : 15; // segment id in a compressed geometry
bool is_startpoint : 1; bool is_startpoint : 1;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // OSRM_EXTRACT_EDGE_BASED_NODE_SEGMENT_HPP #endif // OSRM_EXTRACT_EDGE_BASED_NODE_SEGMENT_HPP

View File

@ -73,7 +73,7 @@ class ExtractionContainers
const std::string &osrm_path, const std::string &osrm_path,
const std::string &names_data_path); const std::string &names_data_path);
}; };
} } // namespace extractor
} } // namespace osrm
#endif /* EXTRACTION_CONTAINERS_HPP */ #endif /* EXTRACTION_CONTAINERS_HPP */

View File

@ -82,7 +82,7 @@ template <typename Iterator> struct iso_8601_grammar : qi::grammar<Iterator, uns
qi::uint_parser<unsigned, 10, 1, 2> uint_p; qi::uint_parser<unsigned, 10, 1, 2> uint_p;
qi::uint_parser<unsigned, 10, 2, 2> uint2_p; qi::uint_parser<unsigned, 10, 2, 2> uint2_p;
}; };
} } // namespace detail
inline bool durationIsValid(const std::string &s) inline bool durationIsValid(const std::string &s)
{ {
@ -136,7 +136,7 @@ inline std::string canonicalizeStringList(std::string strlist, const std::string
return strlist; return strlist;
} }
} // extractor } // namespace extractor
} // osrm } // namespace osrm
#endif // EXTRACTION_HELPER_FUNCTIONS_HPP #endif // EXTRACTION_HELPER_FUNCTIONS_HPP

View File

@ -13,7 +13,7 @@ struct ExtractionNode
bool traffic_lights; bool traffic_lights;
bool barrier; bool barrier;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // EXTRACTION_NODE_HPP #endif // EXTRACTION_NODE_HPP

View File

@ -26,7 +26,7 @@ struct ExtractionSegment
double weight; double weight;
double duration; double duration;
}; };
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -130,7 +130,7 @@ struct ExtractionTurn
double weight; double weight;
double duration; double duration;
}; };
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -26,7 +26,7 @@ inline void maybeSetString(std::string &str, const char *value)
str = std::string(value); str = std::string(value);
} }
} }
} } // namespace detail
/** /**
* This struct is the direct result of the call to ```way_function``` * This struct is the direct result of the call to ```way_function```
@ -130,7 +130,7 @@ struct ExtractionWay
std::uint8_t highway_turn_classification : 4; std::uint8_t highway_turn_classification : 4;
std::uint8_t access_turn_classification : 4; std::uint8_t access_turn_classification : 4;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // EXTRACTION_WAY_HPP #endif // EXTRACTION_WAY_HPP

View File

@ -115,7 +115,7 @@ class Extractor
LaneDescriptionMap lane_description_map, LaneDescriptionMap lane_description_map,
ScriptingEnvironment &scripting_environment); ScriptingEnvironment &scripting_environment);
}; };
} } // namespace extractor
} } // namespace osrm
#endif /* EXTRACTOR_HPP */ #endif /* EXTRACTOR_HPP */

View File

@ -16,15 +16,15 @@ namespace osmium
class Node; class Node;
class Way; class Way;
class Relation; class Relation;
} } // namespace osmium
namespace std namespace std
{ {
template <> struct hash<std::tuple<std::string, std::string, std::string, std::string, std::string>> template <> struct hash<std::tuple<std::string, std::string, std::string, std::string, std::string>>
{ {
std::size_t operator()( std::size_t operator()(
const std::tuple<std::string, std::string, std::string, std::string, std::string> &mk) const const std::tuple<std::string, std::string, std::string, std::string, std::string> &mk)
noexcept const noexcept
{ {
std::size_t seed = 0; std::size_t seed = 0;
boost::hash_combine(seed, std::get<0>(mk)); boost::hash_combine(seed, std::get<0>(mk));
@ -35,7 +35,7 @@ template <> struct hash<std::tuple<std::string, std::string, std::string, std::s
return seed; return seed;
} }
}; };
} } // namespace std
namespace osrm namespace osrm
{ {
@ -93,9 +93,9 @@ class ExtractorCallbacks
void ProcessWay(const osmium::Way &current_way, const ExtractionWay &result_way); void ProcessWay(const osmium::Way &current_way, const ExtractionWay &result_way);
// warning: caller needs to take care of synchronization! // warning: caller needs to take care of synchronization!
void ProcessManeuverOverride(const InputManeuverOverride & override); void ProcessManeuverOverride(const InputManeuverOverride &override);
}; };
} } // namespace extractor
} } // namespace osrm
#endif /* EXTRACTOR_CALLBACKS_HPP */ #endif /* EXTRACTOR_CALLBACKS_HPP */

View File

@ -42,36 +42,35 @@ namespace extractor
struct ExtractorConfig final : storage::IOConfig struct ExtractorConfig final : storage::IOConfig
{ {
ExtractorConfig() noexcept : IOConfig( ExtractorConfig() noexcept
{ : IOConfig(
"", {
}, "",
{}, },
{".osrm", {},
".osrm.restrictions", {".osrm",
".osrm.names", ".osrm.restrictions",
".osrm.tls", ".osrm.names",
".osrm.tld", ".osrm.tls",
".osrm.geometry", ".osrm.tld",
".osrm.nbg_nodes", ".osrm.geometry",
".osrm.ebg_nodes", ".osrm.nbg_nodes",
".osrm.timestamp", ".osrm.ebg_nodes",
".osrm.edges", ".osrm.timestamp",
".osrm.ebg", ".osrm.edges",
".osrm.ramIndex", ".osrm.ebg",
".osrm.fileIndex", ".osrm.ramIndex",
".osrm.turn_duration_penalties", ".osrm.fileIndex",
".osrm.turn_weight_penalties", ".osrm.turn_duration_penalties",
".osrm.turn_penalties_index", ".osrm.turn_weight_penalties",
".osrm.enw", ".osrm.turn_penalties_index",
".osrm.properties", ".osrm.enw",
".osrm.icd", ".osrm.properties",
".osrm.cnbg", ".osrm.icd",
".osrm.cnbg_to_ebg", ".osrm.cnbg",
".osrm.maneuver_overrides"}), ".osrm.cnbg_to_ebg",
requested_num_threads(0), ".osrm.maneuver_overrides"}),
parse_conditionals(false), requested_num_threads(0), parse_conditionals(false), use_locations_cache(true)
use_locations_cache(true)
{ {
} }
@ -94,7 +93,7 @@ struct ExtractorConfig final : storage::IOConfig
bool parse_conditionals; bool parse_conditionals;
bool use_locations_cache; bool use_locations_cache;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // EXTRACTOR_CONFIG_HPP #endif // EXTRACTOR_CONFIG_HPP

View File

@ -586,8 +586,8 @@ void readCompressedNodeBasedGraph(const boost::filesystem::path &path, EdgeListT
storage::serialization::read(reader, "/extractor/cnbg", edge_list); storage::serialization::read(reader, "/extractor/cnbg", edge_list);
} }
} } // namespace files
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -53,7 +53,7 @@ struct FirstAndLastSegmentOfWayCompare
value_type max_value() { return FirstAndLastSegmentOfWay::max_value(); } value_type max_value() { return FirstAndLastSegmentOfWay::max_value(); }
value_type min_value() { return FirstAndLastSegmentOfWay::min_value(); } value_type min_value() { return FirstAndLastSegmentOfWay::min_value(); }
}; };
} } // namespace extractor
} } // namespace osrm
#endif /* FIRST_AND_LAST_SEGMENT_OF_WAY_HPP */ #endif /* FIRST_AND_LAST_SEGMENT_OF_WAY_HPP */

View File

@ -53,11 +53,11 @@ IntersectionPrinter<IntersectionType>::IntersectionPrinter(
} }
template <typename IntersectionType> template <typename IntersectionType>
util::json::Array IntersectionPrinter<IntersectionType>:: util::json::Array IntersectionPrinter<IntersectionType>::operator()(
operator()(const NodeID intersection_node, const NodeID intersection_node,
const IntersectionType &intersection, const IntersectionType &intersection,
const boost::optional<util::json::Object> &node_style, const boost::optional<util::json::Object> &node_style,
const boost::optional<util::json::Object> &way_style) const const boost::optional<util::json::Object> &way_style) const
{ {
// request the number of lanes. This process needs to be in sync with what happens over at // request the number of lanes. This process needs to be in sync with what happens over at
// intersection analysis // intersection analysis

View File

@ -39,7 +39,7 @@ class GraphCompressor
unsigned original_number_of_edges, unsigned original_number_of_edges,
const util::NodeBasedDynamicGraph &graph) const; const util::NodeBasedDynamicGraph &graph) const;
}; };
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -49,7 +49,7 @@ struct ByEdgeOrByMeterValue
using value_type = float; using value_type = float;
value_type value; value_type value;
}; };
} } // namespace detail
struct InternalExtractorEdge struct InternalExtractorEdge
{ {
@ -86,7 +86,7 @@ struct InternalExtractorEdge
// coordinate of the source node // coordinate of the source node
util::Coordinate source_coordinate; util::Coordinate source_coordinate;
}; };
} } // namespace extractor
} } // namespace osrm
#endif // INTERNAL_EXTRACTOR_EDGE_HPP #endif // INTERNAL_EXTRACTOR_EDGE_HPP

View File

@ -79,8 +79,8 @@ IntersectionView getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
// for getConnectedRoads. // for getConnectedRoads.
IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph, IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph,
IntersectionEdge road); IntersectionEdge road);
} } // namespace intersection
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -42,8 +42,8 @@ struct IntersectionEdgeGeometry
}; };
using IntersectionEdgeGeometries = std::vector<IntersectionEdgeGeometry>; using IntersectionEdgeGeometries = std::vector<IntersectionEdgeGeometry>;
} } // namespace intersection
} } // namespace extractor
} } // namespace osrm
#endif #endif

View File

@ -30,7 +30,7 @@ template <storage::Ownership Ownership>
void write(storage::tar::FileWriter &writer, void write(storage::tar::FileWriter &writer,
const std::string &name, const std::string &name,
const detail::IntersectionBearingsContainer<Ownership> &turn_data); const detail::IntersectionBearingsContainer<Ownership> &turn_data);
} } // namespace serialization
namespace detail namespace detail
{ {
@ -99,12 +99,12 @@ template <storage::Ownership Ownership> class IntersectionBearingsContainer
Vector<BearingClassID> node_to_class_id; Vector<BearingClassID> node_to_class_id;
RangeTable<16> class_id_to_ranges_table; RangeTable<16> class_id_to_ranges_table;
}; };
} } // namespace detail
using IntersectionBearingsContainer = using IntersectionBearingsContainer =
detail::IntersectionBearingsContainer<storage::Ownership::Container>; detail::IntersectionBearingsContainer<storage::Ownership::Container>;
using IntersectionBearingsView = detail::IntersectionBearingsContainer<storage::Ownership::View>; using IntersectionBearingsView = detail::IntersectionBearingsContainer<storage::Ownership::View>;
} } // namespace extractor
} } // namespace osrm
#endif #endif

Some files were not shown because too many files have changed in this diff Show More