Use nested namespace
It's a mechanical change to modernize the code base
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user