Use nested namespace

It's a mechanical change to modernize the code base
This commit is contained in:
Dennis Luxen
2022-12-11 10:10:26 +01:00
parent 152a52bc1a
commit a4aa153ba4
456 changed files with 469 additions and 2474 deletions
+1 -4
View File
@@ -16,9 +16,7 @@
#include <boost/filesystem/fstream.hpp>
namespace osrm
{
namespace benchmarks
namespace osrm::benchmarks
{
using namespace osrm::test;
@@ -74,7 +72,6 @@ void benchmark(BenchStaticRTree &rtree, unsigned num_queries)
return rtree.Nearest(q, 10);
});
}
} // namespace benchmarks
} // namespace osrm
int main(int argc, char **argv)
+1 -4
View File
@@ -37,9 +37,7 @@
#include <boost/assert.hpp>
#include <tbb/global_control.h>
namespace osrm
{
namespace contractor
namespace osrm::contractor
{
int Contractor::Run()
@@ -125,5 +123,4 @@ int Contractor::Run()
return 0;
}
} // namespace contractor
} // namespace osrm
+1 -4
View File
@@ -3,9 +3,7 @@
#include "contractor/contractor_graph.hpp"
#include "contractor/contractor_heap.hpp"
namespace osrm
{
namespace contractor
namespace osrm::contractor
{
namespace
@@ -85,5 +83,4 @@ void search(ContractorHeap &heap,
relaxNode(heap, graph, node, node_weight, forbidden_node);
}
}
} // namespace contractor
} // namespace osrm
+1 -4
View File
@@ -23,9 +23,7 @@
#include <memory>
#include <vector>
namespace osrm
{
namespace contractor
namespace osrm::contractor
{
namespace
{
@@ -768,5 +766,4 @@ std::vector<bool> contractGraph(ContractorGraph &graph,
return std::move(node_data.is_core);
}
} // namespace contractor
} // namespace osrm
+1 -4
View File
@@ -23,9 +23,7 @@
#include <tbb/global_control.h>
namespace osrm
{
namespace customizer
namespace osrm::customizer
{
namespace
@@ -183,5 +181,4 @@ int Customizer::Run(const CustomizationConfig &config)
return 0;
}
} // namespace customizer
} // namespace osrm
+1 -10
View File
@@ -21,13 +21,7 @@
using TurnInstruction = osrm::guidance::TurnInstruction;
namespace osrm
{
namespace engine
{
namespace api
{
namespace json
namespace osrm::engine::api::json
{
namespace detail
{
@@ -294,7 +288,4 @@ util::json::Array makeRouteLegs(std::vector<guidance::RouteLeg> legs,
}
return json_legs;
}
} // namespace json
} // namespace api
} // namespace engine
} // namespace osrm
@@ -10,11 +10,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
{
namespace datafacade
namespace osrm::engine::datafacade
{
MMapMemoryAllocator::MMapMemoryAllocator(const storage::StorageConfig &config)
@@ -67,6 +63,4 @@ MMapMemoryAllocator::~MMapMemoryAllocator() {}
const storage::SharedDataIndex &MMapMemoryAllocator::GetIndex() { return index; }
} // namespace datafacade
} // namespace engine
} // namespace osrm
@@ -3,11 +3,7 @@
#include "boost/assert.hpp"
namespace osrm
{
namespace engine
{
namespace datafacade
namespace osrm::engine::datafacade
{
ProcessMemoryAllocator::ProcessMemoryAllocator(const storage::StorageConfig &config)
@@ -38,6 +34,4 @@ ProcessMemoryAllocator::~ProcessMemoryAllocator() {}
const storage::SharedDataIndex &ProcessMemoryAllocator::GetIndex() { return index; }
} // namespace datafacade
} // namespace engine
} // namespace osrm
@@ -6,11 +6,7 @@
#include "boost/assert.hpp"
namespace osrm
{
namespace engine
{
namespace datafacade
namespace osrm::engine::datafacade
{
SharedMemoryAllocator::SharedMemoryAllocator(
@@ -41,6 +37,4 @@ SharedMemoryAllocator::~SharedMemoryAllocator() {}
const storage::SharedDataIndex &SharedMemoryAllocator::GetIndex() { return index; }
} // namespace datafacade
} // namespace engine
} // namespace osrm
+1 -4
View File
@@ -12,9 +12,7 @@
#include <stack>
#include <utility>
namespace osrm
{
namespace engine
namespace osrm::engine
{
// Normed to the thresholds table
@@ -119,5 +117,4 @@ std::vector<util::Coordinate> douglasPeucker(std::vector<util::Coordinate>::cons
return simplified_geometry;
}
} // namespace engine
} // namespace osrm
+1 -4
View File
@@ -1,8 +1,6 @@
#include "engine/engine_config.hpp"
namespace osrm
{
namespace engine
namespace osrm::engine
{
bool EngineConfig::IsValid() const
@@ -27,5 +25,4 @@ bool EngineConfig::IsValid() const
storage_config.IsValid()) &&
limits_valid;
}
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -9,11 +9,7 @@
#include <utility>
#include <vector>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
namespace
{
@@ -90,6 +86,4 @@ std::vector<util::Coordinate> assembleOverview(const std::vector<LegGeometry> &l
return overview_geometry;
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -2,11 +2,7 @@
#include <numeric>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
Route assembleRoute(const std::vector<RouteLeg> &route_legs)
@@ -27,6 +23,4 @@ Route assembleRoute(const std::vector<RouteLeg> &route_legs)
return Route{distance, duration, weight};
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -10
View File
@@ -8,13 +8,7 @@
#include <cmath>
#include <cstddef>
namespace osrm
{
namespace engine
{
namespace guidance
{
namespace detail
namespace osrm::engine::guidance::detail
{
std::pair<short, short> getDepartBearings(const LegGeometry &leg_geometry,
@@ -50,7 +44,4 @@ std::pair<short, short> getArriveBearings(const LegGeometry &leg_geometry,
return std::make_pair<short, short>(
std::round(util::coordinate_calculation::bearing(pre_turn_coordinate, turn_coordinate)), 0);
}
} // namespace detail
} // namespace guidance
} // namespace engine
} // namespace osrm
@@ -6,11 +6,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
using namespace osrm::guidance;
@@ -419,6 +415,4 @@ bool straightTurnFollowedByChoiceless(const RouteStepIterator step_entering_inte
noIntermediaryIntersections(*step_entering_intersection);
}
} /* namespace guidance */
} /* namespace engine */
} /* namespace osrm */
+1 -7
View File
@@ -10,11 +10,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
using osrm::util::angularDeviation;
using namespace osrm::guidance;
@@ -667,6 +663,4 @@ RouteSteps collapseSegregatedTurnInstructions(RouteSteps steps)
return steps;
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -9,11 +9,7 @@
#include <unordered_set>
#include <utility>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
using namespace osrm::guidance;
@@ -209,6 +205,4 @@ std::vector<RouteStep> anticipateLaneChange(std::vector<RouteStep> steps,
return steps;
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -21,11 +21,7 @@
#include <limits>
#include <utility>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
using namespace osrm::guidance;
@@ -718,6 +714,4 @@ void applyOverrides(const datafacade::BaseDataFacade &facade,
}
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -4,11 +4,7 @@
#include <boost/assert.hpp>
#include <iterator>
namespace osrm
{
namespace engine
{
namespace guidance
namespace osrm::engine::guidance
{
using namespace osrm::guidance;
@@ -85,6 +81,4 @@ std::vector<RouteStep> suppressShortNameSegments(std::vector<RouteStep> steps)
return removeNoTurnInstructions(std::move(steps));
}
} // namespace guidance
} // namespace engine
} // namespace osrm
+1 -4
View File
@@ -9,9 +9,7 @@
#include <tuple>
#include <unordered_set>
namespace osrm
{
namespace engine
namespace osrm::engine
{
bool SegmentHint::IsValid(const util::Coordinate new_input_coordinates,
@@ -124,5 +122,4 @@ bool Hint::IsValid(const util::Coordinate new_input_coordinates,
return true;
}
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -16,11 +16,7 @@
#include <set>
#include <vector>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
// Filters PhantomNodes to obtain a set of viable candidates
@@ -314,6 +310,4 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -7,11 +7,7 @@
#include <boost/assert.hpp>
#include <boost/numeric/conversion/cast.hpp>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
NearestPlugin::NearestPlugin(const int max_results_) : max_results{max_results_} {}
@@ -57,6 +53,4 @@ Status NearestPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -11,11 +11,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
TablePlugin::TablePlugin(const int max_locations_distance_table)
@@ -157,6 +153,4 @@ Status TablePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -26,11 +26,7 @@
#include <cmath>
#include <cstdint>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
constexpr const static int MIN_ZOOM_FOR_TURNS = 15;
@@ -695,6 +691,4 @@ Status TilePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -13,11 +13,7 @@
#include <utility>
#include <vector>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
bool IsStronglyConnectedComponent(const util::DistTableWrapper<EdgeDuration> &result_table)
@@ -297,6 +293,4 @@ Status TripPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -12,11 +12,7 @@
#include <string>
#include <vector>
namespace osrm
{
namespace engine
{
namespace plugins
namespace osrm::engine::plugins
{
ViaRoutePlugin::ViaRoutePlugin(int max_locations_viaroute, int max_alternatives)
@@ -186,6 +182,4 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
return Status::Ok;
}
} // namespace plugins
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -7,11 +7,7 @@
#include <cstddef>
#include <cstdlib>
namespace osrm
{
namespace engine
{
namespace detail // anonymous to keep TU local
namespace osrm::engine::detail // anonymous to keep TU local
{
std::string encode(int number_to_encode)
@@ -75,6 +71,4 @@ std::int32_t decode_polyline_integer(std::string::const_iterator &first,
result = ((result & 1) == 1) ? ~(result >> 1) : (result >> 1);
return static_cast<std::int32_t>(result);
}
} // namespace detail
} // namespace engine
} // namespace osrm
@@ -11,11 +11,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
// Unqualified calls below are from the ch namespace.
@@ -854,6 +850,4 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData<Algorithm> &engi
return InternalManyRoutesResult{{std::move(primary_route), std::move(secondary_route)}};
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -15,11 +15,7 @@
#include <boost/iterator/function_output_iterator.hpp>
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
// Unqualified calls below are from the mld namespace.
@@ -960,6 +956,4 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData<Algorithm> &sear
return InternalManyRoutesResult{std::move(routes)};
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -3,11 +3,7 @@
#include "engine/routing_algorithms/routing_base_ch.hpp"
#include "engine/routing_algorithms/routing_base_mld.hpp"
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
/// This is a stripped down version of the general shortest path algorithm.
@@ -91,6 +87,4 @@ InternalRouteResult directShortestPathSearch(SearchEngineData<mld::Algorithm> &e
return extractRoute(facade, weight, endpoint_candidates, unpacked_nodes, unpacked_edges);
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -8,11 +8,7 @@
#include <memory>
#include <vector>
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
namespace ch
@@ -251,6 +247,4 @@ manyToManySearch(SearchEngineData<ch::Algorithm> &engine_working_data,
return std::make_pair(std::move(durations_table), std::move(distances_table));
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -9,11 +9,7 @@
#include <unordered_map>
#include <vector>
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
namespace mld
@@ -676,6 +672,4 @@ manyToManySearch(SearchEngineData<mld::Algorithm> &engine_working_data,
calculate_distance);
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -17,11 +17,7 @@
#include <numeric>
#include <utility>
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
namespace
@@ -457,8 +453,6 @@ mapMatching(SearchEngineData<mld::Algorithm> &engine_working_data,
const std::vector<boost::optional<double>> &trace_gps_precision,
const bool allow_splitting);
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
//[1] "Hidden Markov Map Matching Through Noise and Sparseness"; P. Newson and J. Krumm; 2009; ACM
@@ -1,10 +1,6 @@
#include "engine/routing_algorithms/routing_base.hpp"
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
bool requiresForwardLoop(const PhantomNode &source, const PhantomNode &target)
@@ -107,6 +103,4 @@ PhantomEndpoints endpointsFromCandidates(const PhantomEndpointCandidates &candid
return PhantomEndpoints{*source_it, *target_it};
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -1,12 +1,6 @@
#include "engine/routing_algorithms/routing_base_ch.hpp"
namespace osrm
{
namespace engine
{
namespace routing_algorithms
{
namespace ch
namespace osrm::engine::routing_algorithms::ch
{
/**
@@ -208,8 +202,4 @@ double getNetworkDistance(SearchEngineData<Algorithm> &engine_working_data,
return getPathDistance(facade, unpacked_path, source_phantom, target_phantom);
}
} // namespace ch
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
@@ -2,11 +2,7 @@
#include "engine/routing_algorithms/routing_base_mld.hpp"
#include "engine/routing_algorithms/shortest_path_impl.hpp"
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
template InternalRouteResult
@@ -21,6 +17,4 @@ shortestPathSearch(SearchEngineData<mld::Algorithm> &engine_working_data,
const std::vector<PhantomNodeCandidates> &waypoint_candidates,
const boost::optional<bool> continue_straight_at_waypoint);
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
+1 -7
View File
@@ -1,10 +1,6 @@
#include "engine/routing_algorithms/tile_turns.hpp"
namespace osrm
{
namespace engine
{
namespace routing_algorithms
namespace osrm::engine::routing_algorithms
{
namespace
@@ -269,6 +265,4 @@ std::vector<TurnData> getTileTurns(const DataFacade<mld::Algorithm> &facade,
return generateTurns(facade, edges, sorted_edge_indexes, edge_finder);
}
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm
+1 -4
View File
@@ -1,8 +1,6 @@
#include "engine/search_engine_data.hpp"
namespace osrm
{
namespace engine
namespace osrm::engine
{
// CH heaps
@@ -130,5 +128,4 @@ void SearchEngineData<MLD>::InitializeOrClearManyToManyThreadLocalStorage(
many_to_many_heap.reset(new ManyToManyQueryHeap(number_of_nodes, number_of_boundary_nodes));
}
}
} // namespace engine
} // namespace osrm
+1 -4
View File
@@ -11,9 +11,7 @@
#include <iostream>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
CompressedEdgeContainer::CompressedEdgeContainer()
@@ -399,5 +397,4 @@ std::unique_ptr<SegmentDataContainer> CompressedEdgeContainer::ToSegmentData()
return std::move(segment_data);
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -34,9 +34,7 @@
#include <tbb/parallel_for.h>
#include <tbb/parallel_pipeline.h>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Configuration to find representative candidate for turn angle calculations
@@ -1291,5 +1289,4 @@ EdgeBasedGraphFactory::IndexConditionals(std::vector<Conditional> &&conditionals
return indexed_restrictions;
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -378,9 +378,7 @@ get_via_node_path_from_OSM_ids(const std::string &turn_relation_type,
} // namespace
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
ExtractionContainers::ExtractionContainers()
@@ -1310,5 +1308,4 @@ void ExtractionContainers::PrepareRestrictions(const ReferencedWays &restriction
}
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -58,9 +58,7 @@
#include <unordered_map>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace
@@ -911,5 +909,4 @@ void Extractor::ProcessGuidanceTurns(
util::Log() << "ok, after " << TIMER_SEC(write_guidance_data) << "s";
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -40,9 +40,7 @@ const ByEdgeOrByMeterValue::ValueByMeter ByEdgeOrByMeterValue::by_meter;
#endif
#endif
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
ExtractorCallbacks::ExtractorCallbacks(ExtractionContainers &extraction_containers_,
std::unordered_map<std::string, ClassData> &classes_map,
@@ -492,5 +490,4 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
external_memory.way_node_id_offsets.push_back(external_memory.used_node_id_list.size());
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -14,9 +14,7 @@
#include <boost/assert.hpp>
#include <unordered_set>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
static constexpr int SECOND_TO_DECISECOND = 10;
@@ -419,5 +417,4 @@ void GraphCompressor::PrintStatistics(unsigned original_number_of_nodes,
util::Log() << "Node compression ratio: " << new_node_count / (double)original_number_of_nodes;
util::Log() << "Edge compression ratio: " << new_edge_count / (double)original_number_of_edges;
}
} // namespace extractor
} // namespace osrm
@@ -11,11 +11,7 @@
#include "util/bearing.hpp"
#include "util/coordinate_calculation.hpp"
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
namespace
@@ -1171,6 +1167,4 @@ CoordinateExtractor::RegressionLine(const std::vector<util::Coordinate> &coordin
return {coord_between_front, coord_between_back};
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
@@ -2,11 +2,7 @@
#include "util/guidance/name_announcements.hpp"
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
// check if two name ids can be seen as identical (in presence of refs/others)
@@ -25,6 +21,4 @@ bool HaveIdenticalNames(const NameID lhs,
!util::guidance::requiresNameAnnounced(rhs, lhs, name_table, street_name_suffix_table);
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
+1 -7
View File
@@ -5,11 +5,7 @@
#include <boost/range/adaptors.hpp>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
bool IntersectionViewData::CompareByAngle(const IntersectionViewData &other) const
@@ -37,6 +33,4 @@ std::string toString(const IntersectionViewData &view)
return result;
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
@@ -7,11 +7,7 @@
#include <boost/optional/optional_io.hpp>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
IntersectionEdges getIncomingEdges(const util::NodeBasedDynamicGraph &graph,
@@ -856,6 +852,4 @@ IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph, In
return road;
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
@@ -12,11 +12,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
namespace
@@ -616,6 +612,4 @@ bool MergableRoadDetector::IsLinkRoad(const NodeID intersection_node,
.annotation_data));
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
@@ -7,11 +7,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
// ---------------------------------------------------------------------------------
@@ -289,6 +285,4 @@ void IntersectionFinderAccumulator::update(const NodeID from_node,
{from_node, via_edge});
}
} // namespace intersection
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -14,9 +14,7 @@
#include <fstream>
#include <string>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
LocationDependentData::LocationDependentData(const std::vector<boost::filesystem::path> &file_paths)
@@ -275,5 +273,4 @@ std::vector<std::size_t> LocationDependentData::GetPropertyIndexes(const point_t
return result;
}
} // namespace extractor
} // namespace osrm
@@ -11,9 +11,7 @@
#include <algorithm>
#include <iterator>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
ManeuverOverrideRelationParser::ManeuverOverrideRelationParser() {}
@@ -136,5 +134,4 @@ ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const
}
return maneuver_override;
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -10,9 +10,7 @@
#include <set>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
NodeBasedGraphFactory::NodeBasedGraphFactory(
@@ -238,5 +236,4 @@ void NodeBasedGraphFactory::ReleaseOsmNodes()
extractor::PackedOSMIDs().swap(osm_node_ids);
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -8,9 +8,7 @@
#include <cmath>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
RasterSource::RasterSource(RasterGrid _raster_data,
@@ -169,5 +167,4 @@ RasterContainer::GetRasterInterpolateFromSource(unsigned int source_id, double l
}
RasterCache *RasterCache::g_instance = NULL;
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -7,9 +7,7 @@
#include <boost/range/algorithm/copy.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace restriction_graph_details
@@ -284,5 +282,4 @@ RestrictionGraph::EdgeRange RestrictionGraph::GetEdges(RestrictionID id) const
edges.begin() + node.edges_begin_idx + node.num_edges);
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -13,9 +13,7 @@
#include <algorithm>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
RestrictionParser::RestrictionParser(bool use_turn_restrictions_,
@@ -284,5 +282,4 @@ bool RestrictionParser::ShouldIgnoreRestriction(const std::string &except_tag_st
}
return restrictions.find(current_string) != restrictions.end();
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -39,9 +39,7 @@ template <> struct is_container<osmium::Relation> : std::false_type
};
} // namespace sol
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace
@@ -1251,5 +1249,4 @@ void LuaScriptingContext::ProcessWay(const osmium::Way &way,
}
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -6,9 +6,7 @@
#include <boost/algorithm/string.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
SuffixTable::SuffixTable(ScriptingEnvironment &scripting_environment)
@@ -33,5 +31,4 @@ bool SuffixTable::isSuffix(std::string_view possible_suffix) const
return suffix_set.count(possible_suffix) > 0;
}
} /* namespace extractor */
} /* namespace osrm */
+1 -4
View File
@@ -5,9 +5,7 @@
#include <algorithm>
#include <boost/assert.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
TurnPathCompressor::TurnPathCompressor(std::vector<TurnRestriction> &restrictions,
@@ -160,5 +158,4 @@ void TurnPathCompressor::Compress(const NodeID from, const NodeID via, const Nod
vias.erase(via);
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -7,9 +7,7 @@
#include <algorithm>
#include <boost/assert.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
template <typename T>
@@ -84,5 +82,4 @@ template std::vector<UnresolvedManeuverOverride>
removeInvalidTurnPaths<>(std::vector<UnresolvedManeuverOverride>,
const util::NodeBasedDynamicGraph &);
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -3,9 +3,7 @@
#include <tuple>
#include <utility>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
WayRestrictionMap::WayRestrictionMap(const RestrictionGraph &restriction_graph)
@@ -121,5 +119,4 @@ NodeID WayRestrictionMap::RemapIfRestrictionVia(const NodeID edge_based_target_n
return edge_based_target_node;
}
} // namespace extractor
} // namespace osrm
+1 -4
View File
@@ -2,9 +2,7 @@
#include "util/assert.hpp"
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
DrivewayHandler::DrivewayHandler(const util::NodeBasedDynamicGraph &node_based_graph,
@@ -91,5 +89,4 @@ Intersection DrivewayHandler::operator()(const NodeID nid,
return intersection;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -13,9 +13,7 @@
#include <thread>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph,
@@ -349,5 +347,4 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph,
<< bearing_class_hash.data.size() << " Bearing Classes";
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -14,9 +14,7 @@
using EdgeData = osrm::util::NodeBasedDynamicGraph::EdgeData;
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
namespace detail
@@ -488,5 +486,4 @@ bool IntersectionHandler::isSameName(const EdgeID source_edge_id, const EdgeID t
street_name_suffix_table); //
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -13,9 +13,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
namespace
{
@@ -562,5 +560,4 @@ Intersection MotorwayHandler::fallback(Intersection intersection) const
return intersection;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -15,9 +15,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
RoundaboutHandler::RoundaboutHandler(
@@ -500,5 +498,4 @@ Intersection RoundaboutHandler::handleRoundabouts(const RoundaboutType roundabou
return intersection;
}
} // namespace guidance
} // namespace osrm
@@ -6,9 +6,7 @@
#include "util/coordinate_calculation.hpp"
#include <set>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
// Maximum length in meters of an internal intersection edge
@@ -288,5 +286,4 @@ std::unordered_set<EdgeID> findSegregatedNodes(const extractor::NodeBasedGraphFa
return segregated_edges;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -14,9 +14,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
SliproadHandler::SliproadHandler(const util::NodeBasedDynamicGraph &node_based_graph,
@@ -876,5 +874,4 @@ SliproadHandler::scaledThresholdByRoadClass(const double max_threshold,
return scaled;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -4,9 +4,7 @@
#include <algorithm>
#include <iterator>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
SuppressModeHandler::SuppressModeHandler(
@@ -77,5 +75,4 @@ SuppressModeHandler::operator()(const NodeID, const EdgeID, Intersection interse
return intersection;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -10,9 +10,7 @@
#include <unordered_set>
#include <utility>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
using EdgeData = util::NodeBasedDynamicGraph::EdgeData;
@@ -199,5 +197,4 @@ Intersection TurnAnalysis::setTurnTypes(const NodeID node_prior_to_intersection,
return intersection;
}
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -6,9 +6,7 @@
#include <cstddef>
#include <cstdint>
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
std::pair<util::guidance::EntryClass, util::guidance::BearingClass>
@@ -93,5 +91,4 @@ classifyIntersection(Intersection intersection, const osrm::util::Coordinate &lo
return std::make_pair(entry_class, bearing_class);
}
} // namespace guidance
} // namespace osrm
+1 -7
View File
@@ -7,11 +7,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
{
namespace lanes
namespace osrm::guidance::lanes
{
bool findPreviousIntersection(const NodeID node_v,
@@ -145,6 +141,4 @@ bool findPreviousIntersection(const NodeID node_v,
return true;
}
} // namespace lanes
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -69,9 +69,7 @@ InputIt findOutermostForkCandidate(const InputIt begin, const InputIt end)
}
} // namespace
namespace osrm
{
namespace guidance
namespace osrm::guidance
{
// a wrapper to handle road indices of forks at intersections
@@ -845,5 +843,4 @@ void TurnHandler::handleDistinctConflict(const EdgeID via_edge,
}
}
} // namespace guidance
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <cstddef>
#include <utility>
namespace osrm
{
namespace guidance
{
namespace lanes
namespace osrm::guidance::lanes
{
namespace
@@ -349,6 +345,4 @@ LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data,
return lane_data;
}
} // namespace lanes
} // namespace guidance
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <unordered_map>
#include <utility>
namespace osrm
{
namespace guidance
{
namespace lanes
namespace osrm::guidance::lanes
{
namespace TurnLaneType = extractor::TurnLaneType;
using TurnLaneDescription = extractor::TurnLaneDescription;
@@ -154,6 +150,4 @@ bool hasTag(const TurnLaneType::Mask tag, const LaneDataVector &data)
return findTag(tag, data) != data.cend();
}
} // namespace lanes
} // namespace guidance
} // namespace osrm
+1 -7
View File
@@ -15,11 +15,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
{
namespace lanes
namespace osrm::guidance::lanes
{
namespace TurnLaneType = extractor::TurnLaneType;
using TurnLaneDescription = extractor::TurnLaneDescription;
@@ -813,6 +809,4 @@ Intersection TurnLaneHandler::handleSliproadTurn(Intersection intersection,
return simpleMatchTuplesToTurns(std::move(intersection), lane_data, combined_id);
}
} // namespace lanes
} // namespace guidance
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
{
namespace lanes
namespace osrm::guidance::lanes
{
namespace TurnLaneType = extractor::TurnLaneType;
@@ -272,6 +268,4 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
return intersection;
}
} // namespace lanes
} // namespace guidance
} // namespace osrm
+1 -4
View File
@@ -5,9 +5,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
BisectionGraphView::BisectionGraphView(const BisectionGraph &bisection_graph_)
@@ -52,5 +50,4 @@ const BisectionGraphView::EdgeT &BisectionGraphView::Edge(const EdgeID eid) cons
return bisection_graph.Edge(eid);
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -1,8 +1,6 @@
#include "partitioner/bisection_to_partition.hpp"
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
namespace
@@ -140,5 +138,4 @@ bisectionToPartition(const std::vector<BisectionID> &node_to_bisection_id,
return std::make_tuple(std::move(partitions), std::move(num_cells));
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -8,9 +8,7 @@
#include <set>
#include <stack>
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
namespace
@@ -309,5 +307,4 @@ bool DinicMaxFlow::Validate(const BisectionGraphView &view,
return separated && in_range_source && in_range_sink;
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -17,9 +17,7 @@
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
namespace
{
@@ -159,5 +157,4 @@ DinicMaxFlow::MinCut computeInertialFlowCut(const BisectionGraphView &view,
return bestMinCut(view, num_slopes, source_sink_rate, balance);
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -31,9 +31,7 @@
#include "util/timing_util.hpp"
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
auto getGraphBisection(const PartitionerConfig &config)
{
@@ -200,5 +198,4 @@ int Partitioner::Run(const PartitionerConfig &config)
return 0;
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -17,9 +17,7 @@
#include <utility>
#include <vector>
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
RecursiveBisection::RecursiveBisection(BisectionGraph &bisection_graph_,
@@ -107,5 +105,4 @@ const std::vector<BisectionID> &RecursiveBisection::BisectionIDs() const
std::uint32_t RecursiveBisection::SCCDepth() const { return internal_state.SCCDepth(); }
} // namespace partitioner
} // namespace osrm
@@ -8,9 +8,7 @@
#include <set>
#include <unordered_map>
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
RecursiveBisectionState::RecursiveBisectionState(BisectionGraph &bisection_graph_)
@@ -181,5 +179,4 @@ const std::vector<BisectionID> &RecursiveBisectionState::BisectionIDs() const
std::uint32_t RecursiveBisectionState::SCCDepth() const { return scc_levels; }
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -2,9 +2,7 @@
#include "util/permutation.hpp"
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
namespace
{
@@ -66,5 +64,4 @@ std::vector<std::uint32_t> makePermutation(const DynamicEdgeBasedGraph &graph,
return util::orderingToPermutation(ordering);
}
} // namespace partitioner
} // namespace osrm
+1 -4
View File
@@ -1,8 +1,6 @@
#include "partitioner/tarjan_graph_wrapper.hpp"
namespace osrm
{
namespace partitioner
namespace osrm::partitioner
{
TarjanGraphWrapper::TarjanGraphWrapper(const BisectionGraph &bisection_graph_)
@@ -22,5 +20,4 @@ NodeID TarjanGraphWrapper::GetTarget(const EdgeID eid) const
return bisection_graph.Edge(eid).target;
}
} // namespace partitioner
} // namespace osrm
+1 -7
View File
@@ -9,11 +9,7 @@
#include <type_traits>
namespace osrm
{
namespace server
{
namespace api
namespace osrm::server::api
{
namespace detail
@@ -110,6 +106,4 @@ boost::optional<engine::api::TileParameters> parseParameters(std::string::iterat
return detail::parseParameters<engine::api::TileParameters, TileParametersGrammar<>>(iter, end);
}
} // namespace api
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -62,11 +62,7 @@ struct URLParser final : qi::grammar<Iterator, Into>
} // namespace
namespace osrm
{
namespace server
{
namespace api
namespace osrm::server::api
{
boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::string::iterator end)
@@ -93,6 +89,4 @@ boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::stri
return boost::none;
}
} // namespace api
} // namespace server
} // namespace osrm
+1 -4
View File
@@ -9,9 +9,7 @@
#include <vector>
namespace osrm
{
namespace server
namespace osrm::server
{
Connection::Connection(boost::asio::io_context &io_context, RequestHandler &handler)
@@ -220,5 +218,4 @@ std::vector<char> Connection::compress_buffers(const std::vector<char> &uncompre
return compressed_data;
}
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -2,11 +2,7 @@
#include <string>
namespace osrm
{
namespace server
{
namespace http
namespace osrm::server::http
{
const char ok_html[] = "";
@@ -104,6 +100,4 @@ boost::asio::const_buffer reply::status_to_buffer(const reply::status_type statu
}
reply::reply() : status(ok) {}
} // namespace http
} // namespace server
} // namespace osrm
+1 -4
View File
@@ -27,9 +27,7 @@
#include <string>
#include <thread>
namespace osrm
{
namespace server
namespace osrm::server
{
void RequestHandler::RegisterServiceHandler(
@@ -177,5 +175,4 @@ void RequestHandler::HandleRequest(const http::request &current_request, http::r
<< ", uri: " << current_request.uri;
}
}
} // namespace server
} // namespace osrm
+1 -4
View File
@@ -8,9 +8,7 @@
#include <string>
namespace osrm
{
namespace server
namespace osrm::server
{
RequestParser::RequestParser()
@@ -298,5 +296,4 @@ bool RequestParser::is_digit(const int character) const
{
return character >= '0' && character <= '9';
}
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <boost/format.hpp>
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
namespace
{
@@ -78,6 +74,4 @@ engine::Status MatchService::RunQuery(std::size_t prefix_length,
}
return BaseService::routing_machine.Match(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <boost/format.hpp>
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
namespace
@@ -72,6 +68,4 @@ engine::Status NearestService::RunQuery(std::size_t prefix_length,
}
return BaseService::routing_machine.Nearest(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -6,11 +6,7 @@
#include "util/json_container.hpp"
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
namespace
{
@@ -76,6 +72,4 @@ engine::Status RouteService::RunQuery(std::size_t prefix_length,
}
return BaseService::routing_machine.Route(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -7,11 +7,7 @@
#include <boost/format.hpp>
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
namespace
@@ -107,6 +103,4 @@ engine::Status TableService::RunQuery(std::size_t prefix_length,
}
return BaseService::routing_machine.Table(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <boost/format.hpp>
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
engine::Status TileService::RunQuery(std::size_t prefix_length,
@@ -47,6 +43,4 @@ engine::Status TileService::RunQuery(std::size_t prefix_length,
result = std::string();
return BaseService::routing_machine.Tile(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -7
View File
@@ -8,11 +8,7 @@
#include <boost/format.hpp>
namespace osrm
{
namespace server
{
namespace service
namespace osrm::server::service
{
namespace
{
@@ -80,6 +76,4 @@ engine::Status TripService::RunQuery(std::size_t prefix_length,
}
return BaseService::routing_machine.Trip(*parameters, result);
}
} // namespace service
} // namespace server
} // namespace osrm
+1 -4
View File
@@ -12,9 +12,7 @@
#include <memory>
namespace osrm
{
namespace server
namespace osrm::server
{
ServiceHandler::ServiceHandler(osrm::EngineConfig &config) : routing_machine(config)
{
@@ -51,5 +49,4 @@ engine::Status ServiceHandler::RunQuery(api::ParsedURL parsed_url,
return service->RunQuery(parsed_url.prefix_length, parsed_url.query, result);
}
} // namespace server
} // namespace osrm
+1 -4
View File
@@ -6,9 +6,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
namespace osrm
{
namespace storage
namespace osrm::storage
{
namespace fs = boost::filesystem;
@@ -40,5 +38,4 @@ std::vector<std::string> IOConfig::GetMissingFiles() const
}
return missingFiles;
}
} // namespace storage
} // namespace osrm

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