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
@@ -7,9 +7,7 @@
#include <cctype>
#include <cstdint>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
using ClassData = std::uint8_t;
@@ -33,7 +31,6 @@ inline bool isValidClassName(const std::string &name)
return std::isalnum(c);
}) == name.end();
}
} // namespace extractor
} // namespace osrm
#endif
@@ -10,9 +10,7 @@
#include <string>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class CompressedEdgeContainer
@@ -82,7 +80,6 @@ class CompressedEdgeContainer
std::unordered_map<EdgeID, unsigned> m_reverse_edge_id_to_zipped_index_map;
std::unique_ptr<SegmentDataContainer> segment_data;
};
} // namespace extractor
} // namespace osrm
#endif // GEOMETRY_COMPRESSOR_HPP_
@@ -3,9 +3,7 @@
#include "util/typedefs.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// We encode the cnbg graph only using its topology as edge list
@@ -14,7 +12,6 @@ struct CompressedNodeBasedGraphEdge
NodeID source;
NodeID target;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP
@@ -8,10 +8,7 @@
#include <type_traits>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ConditionalTurnPenalty
@@ -22,7 +19,6 @@ struct ConditionalTurnPenalty
std::vector<util::OpeningHours> conditions;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_CONDITIONAL_TURN_PENALTY_HPP_
+1 -4
View File
@@ -8,9 +8,7 @@
#include <cstdint>
#include <string_view>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class Datasources
@@ -45,7 +43,6 @@ class Datasources
std::array<std::uint32_t, MAX_NUM_SOURES> lengths;
std::array<char, MAX_LENGTH_NAME * MAX_NUM_SOURES> sources;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -5,9 +5,7 @@
#include "util/typedefs.hpp"
#include <tuple>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct EdgeBasedEdge
@@ -96,7 +94,6 @@ inline bool EdgeBasedEdge::operator<(const EdgeBasedEdge &other) const
return std::tie(source, target, data.weight, unidirectional) <
std::tie(other.source, other.target, other.data.weight, other_is_unidirectional);
}
} // namespace extractor
} // namespace osrm
#endif /* EDGE_BASED_EDGE_HPP */
@@ -36,9 +36,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ScriptingEnvironment;
@@ -173,7 +171,6 @@ class EdgeBasedGraphFactory
// mapping of node-based edges to edge-based nodes
std::vector<NodeID> nbe_to_ebn_mapping;
};
} // namespace extractor
} // namespace osrm
#endif /* EDGE_BASED_GRAPH_FACTORY_HPP_ */
+1 -4
View File
@@ -3,9 +3,7 @@
#include "util/typedefs.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct EdgeBasedNode
@@ -16,7 +14,6 @@ struct EdgeBasedNode
std::uint32_t segregated : 1;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_EDGE_BASED_NODE_HPP_
@@ -10,9 +10,7 @@
#include <limits>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
/// This is what util::StaticRTree serialized and stores on disk
@@ -48,7 +46,6 @@ struct EdgeBasedNodeSegment
unsigned short fwd_segment_position : 15; // segment id in a compressed geometry
bool is_startpoint : 1;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACT_EDGE_BASED_NODE_SEGMENT_HPP
+1 -4
View File
@@ -14,9 +14,7 @@
#include <unordered_map>
#include <unordered_set>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
/**
@@ -91,7 +89,6 @@ class ExtractionContainers
void PrepareData(ScriptingEnvironment &scripting_environment,
const std::string &names_data_path);
};
} // namespace extractor
} // namespace osrm
#endif /* EXTRACTION_CONTAINERS_HPP */
@@ -14,9 +14,7 @@
#include "guidance/parsing_toolkit.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
@@ -136,7 +134,6 @@ inline std::string canonicalizeStringList(std::string strlist, const std::string
return strlist;
}
} // namespace extractor
} // namespace osrm
#endif // EXTRACTION_HELPER_FUNCTIONS_HPP
+1 -4
View File
@@ -3,9 +3,7 @@
#include "traffic_lights.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ExtractionNode
@@ -19,7 +17,6 @@ struct ExtractionNode
TrafficLightClass::Direction traffic_lights;
bool barrier;
};
} // namespace extractor
} // namespace osrm
#endif // EXTRACTION_NODE_HPP
+1 -4
View File
@@ -11,9 +11,7 @@
#include <unordered_map>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ExtractionRelation
@@ -199,7 +197,6 @@ class ExtractionRelationContainer
RelationRefMap rel_refs;
};
} // namespace extractor
} // namespace osrm
#endif // EXTRACTION_RELATION_HPP
+1 -4
View File
@@ -3,9 +3,7 @@
#include <util/coordinate.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ExtractionSegment
@@ -26,7 +24,6 @@ struct ExtractionSegment
double weight;
double duration;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -9,9 +9,7 @@
#include <cstdint>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ExtractionTurnLeg
@@ -131,7 +129,6 @@ struct ExtractionTurn
double weight;
double duration;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -9,9 +9,7 @@
#include <string>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
{
@@ -130,7 +128,6 @@ struct ExtractionWay
std::uint8_t highway_turn_classification : 4;
std::uint8_t access_turn_classification : 4;
};
} // namespace extractor
} // namespace osrm
#endif // EXTRACTION_WAY_HPP
+1 -4
View File
@@ -46,9 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "traffic_signals.hpp"
#include "util/typedefs.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ScriptingEnvironment;
@@ -120,7 +118,6 @@ class Extractor
LaneDescriptionMap lane_description_map,
ScriptingEnvironment &scripting_environment);
};
} // namespace extractor
} // namespace osrm
#endif /* EXTRACTOR_HPP */
+1 -4
View File
@@ -37,9 +37,7 @@ template <> struct hash<std::tuple<std::string, std::string, std::string, std::s
};
} // namespace std
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ExtractionContainers;
@@ -95,7 +93,6 @@ class ExtractorCallbacks
// warning: caller needs to take care of synchronization!
void ProcessManeuverOverride(const InputManeuverOverride &override);
};
} // namespace extractor
} // namespace osrm
#endif /* EXTRACTOR_CALLBACKS_HPP */
+1 -4
View File
@@ -35,9 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "storage/io_config.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct ExtractorConfig final : storage::IOConfig
@@ -91,7 +89,6 @@ struct ExtractorConfig final : storage::IOConfig
bool use_locations_cache = true;
bool dump_nbg_graph = false;
};
} // namespace extractor
} // namespace osrm
#endif // EXTRACTOR_CONFIG_HPP
+1 -7
View File
@@ -18,11 +18,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace extractor
{
namespace files
namespace osrm::extractor::files
{
// writes the .osrm.icd file
@@ -578,8 +574,6 @@ void readCompressedNodeBasedGraph(const boost::filesystem::path &path, EdgeListT
storage::serialization::read(reader, "/extractor/cnbg", edge_list);
}
} // namespace files
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -11,9 +11,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class CompressedEdgeContainer;
@@ -39,7 +37,6 @@ class GraphCompressor
unsigned original_number_of_edges,
const util::NodeBasedDynamicGraph &graph) const;
};
} // namespace extractor
} // namespace osrm
#endif
@@ -10,9 +10,7 @@
#include <mapbox/variant.hpp>
#include <utility>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
@@ -86,7 +84,6 @@ struct InternalExtractorEdge
// coordinate of the source node
util::Coordinate source_coordinate;
};
} // namespace extractor
} // namespace osrm
#endif // INTERNAL_EXTRACTOR_EDGE_HPP
+1 -7
View File
@@ -1,11 +1,7 @@
#ifndef OSRM_EXTRACTOR_INTERSECTION_CONSTANTS_HPP_
#define OSRM_EXTRACTOR_INTERSECTION_CONSTANTS_HPP_
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
// what angle is interpreted as going straight
@@ -30,8 +26,6 @@ const auto constexpr ASSUMED_LANE_WIDTH = 3.25;
// how far apart can roads be at the most, when thinking about merging them?
const auto constexpr MERGABLE_ANGLE_DIFFERENCE = 95.0;
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_INTERSECTION_CONSTANTS_HPP_
@@ -11,11 +11,7 @@
#include "util/coordinate.hpp"
#include "util/node_based_graph.hpp"
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
class CoordinateExtractor
@@ -251,8 +247,6 @@ class CoordinateExtractor
const std::uint8_t considered_lanes) const;
};
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_INTERSECTION_COORDINATE_EXTRACTOR_HPP_
@@ -5,11 +5,7 @@
#include "extractor/suffix_table.hpp"
#include "guidance/constants.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)
@@ -20,8 +16,6 @@ bool HaveIdenticalNames(const NameID lhs,
const NameTable &name_table,
const SuffixTable &street_name_suffix_table);
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif /*OSRM_EXTRACTOR_INTERSECTION_HAVE_IDENTICAL_NAMES_HPP_*/
@@ -14,11 +14,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
IntersectionEdges getIncomingEdges(const util::NodeBasedDynamicGraph &graph,
@@ -89,8 +85,6 @@ getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph,
// for getConnectedRoads.
IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph,
IntersectionEdge road);
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif
@@ -5,11 +5,7 @@
#include <vector>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
// IntersectionEdge is an alias for incoming and outgoing node-based graph edges of an intersection
@@ -42,8 +38,6 @@ struct IntersectionEdgeGeometry
};
using IntersectionEdgeGeometries = std::vector<IntersectionEdgeGeometry>;
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif
@@ -21,11 +21,7 @@
#include <type_traits>
#include <vector>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
inline auto makeCompareAngularDeviation(const double angle)
@@ -232,8 +228,6 @@ struct IntersectionView final : std::vector<IntersectionViewData>, //
using Base = std::vector<IntersectionViewData>;
};
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif /* OSRM_EXTRACTOR_INTERSECTION_INTERSECTION_VIEW_HPP_*/
@@ -15,11 +15,7 @@
#include <cstdint>
#include <utility>
namespace osrm
{
namespace extractor
{
namespace intersection
namespace osrm::extractor::intersection
{
/*
@@ -311,8 +307,6 @@ struct DistanceToNextIntersectionAccumulator
double distance = 0.;
};
} // namespace intersection
} // namespace extractor
} // namespace osrm
#endif
@@ -10,9 +10,7 @@
#include <numeric>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
{
@@ -106,7 +104,6 @@ template <storage::Ownership Ownership> class IntersectionBearingsContainer
using IntersectionBearingsContainer =
detail::IntersectionBearingsContainer<storage::Ownership::Container>;
using IntersectionBearingsView = detail::IntersectionBearingsContainer<storage::Ownership::View>;
} // namespace extractor
} // namespace osrm
#endif
@@ -11,9 +11,7 @@
#include <string>
#include <unordered_map>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct LocationDependentData
@@ -48,7 +46,6 @@ struct LocationDependentData
std::vector<std::pair<polygon_bands_t, std::size_t>> polygons;
std::vector<properties_t> properties;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -13,9 +13,7 @@
#include <boost/functional/hash.hpp>
#include <mapbox/variant.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Data that is loaded from the OSM datafile directly
@@ -143,7 +141,6 @@ struct UnresolvedManeuverOverride
static std::string Name() { return "maneuver override"; };
};
} // namespace extractor
} // namespace osrm
// custom specialization of std::hash can be injected in namespace std
@@ -12,9 +12,7 @@ namespace osmium
class Relation;
} // namespace osmium
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ScriptingEnvironment;
@@ -59,7 +57,6 @@ class ManeuverOverrideRelationParser
ManeuverOverrideRelationParser();
boost::optional<InputManeuverOverride> TryParse(const osmium::Relation &relation) const;
};
} // namespace extractor
} // namespace osrm
#endif /* RESTRICTION_PARSER_HPP */
+1 -4
View File
@@ -7,9 +7,7 @@
#include <string>
#include <string_view>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
@@ -115,7 +113,6 @@ template <storage::Ownership Ownership> class NameTableImpl
using NameTable = detail::NameTableImpl<storage::Ownership::Container>;
using NameTableView = detail::NameTableImpl<storage::Ownership::View>;
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_NAME_TABLE_HPP
+1 -4
View File
@@ -3,9 +3,7 @@
#include "util/typedefs.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Mapping betweenn the node based graph u,v nodes and the edge based graph head,tail edge ids.
@@ -15,7 +13,6 @@ struct NBGToEBG
NodeID u, v;
NodeID forward_ebg_node, backward_ebg_node;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -10,9 +10,7 @@
#include "extractor/road_classification.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Flags describing the class of the road. This data is used during creation of graphs/guidance
@@ -207,7 +205,6 @@ static_assert(sizeof(extractor::NodeBasedEdge) == 32,
"bigger than expected. This will influence "
"memory consumption.");
} // namespace extractor
} // namespace osrm
#endif /* NODE_BASED_EDGE_HPP */
@@ -19,9 +19,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Turn the output of the extraction process into a graph that represents junctions as nodes and
@@ -104,7 +102,6 @@ class NodeBasedGraphFactory
extractor::CompressedEdgeContainer compressed_edge_container;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_NODE_BASED_GRAPH_FACTORY_HPP_
+1 -4
View File
@@ -13,9 +13,7 @@
#include "util/typedefs.hpp"
#include "util/vector_view.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class Extractor;
@@ -129,7 +127,6 @@ using EdgeBasedNodeDataExternalContainer =
using EdgeBasedNodeDataContainer =
detail::EdgeBasedNodeDataContainerImpl<storage::Ownership::Container>;
using EdgeBasedNodeDataView = detail::EdgeBasedNodeDataContainerImpl<storage::Ownership::View>;
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -11,9 +11,7 @@
#include <utility>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Allows easy check for whether a node restriction is present at a given intersection
@@ -74,7 +72,6 @@ struct UnconditionalOnly
using RestrictionMap = NodeRestrictionMap<UnconditionalOnly>;
using ConditionalRestrictionMap = NodeRestrictionMap<ConditionalOnly>;
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_NODE_RESTRICTION_MAP_HPP_
+1 -4
View File
@@ -7,9 +7,7 @@
#include <string>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// NodesOfWay contains the ordered nodes of a way and provides convenience functions for getting
@@ -50,7 +48,6 @@ struct NodesOfWay
return node_ids[node_ids.size() - 1];
}
};
} // namespace extractor
} // namespace osrm
#endif /* NODES_OF_WAY_HPP */
+1 -4
View File
@@ -4,9 +4,7 @@
#include "util/packed_vector.hpp"
#include "util/typedefs.hpp"
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace detail
{
@@ -16,7 +14,6 @@ using PackedOSMIDs = util::detail::PackedVector<OSMNodeID, 34, Ownership>;
using PackedOSMIDsView = detail::PackedOSMIDs<storage::Ownership::View>;
using PackedOSMIDs = detail::PackedOSMIDs<storage::Ownership::Container>;
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -13,9 +13,7 @@
#include <array>
#include <cstdint>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
const constexpr auto DEFAULT_MAX_SPEED = 180 / 3.6; // 180kmph -> m/s
@@ -138,7 +136,6 @@ struct ProfileProperties
bool force_split_edges = false;
bool call_tagless_node_function = true;
};
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -8,9 +8,7 @@
#include <cstdint>
#include <limits>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct QueryNode
@@ -48,7 +46,6 @@ struct QueryNode
MAX_OSM_NODEID);
}
};
} // namespace extractor
} // namespace osrm
#endif // QUERY_NODE_HPP
+1 -4
View File
@@ -19,9 +19,7 @@
#include <string>
#include <unordered_map>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
/**
@@ -173,7 +171,6 @@ class RasterCache
// the instance
static RasterCache *g_instance;
};
} // namespace extractor
} // namespace osrm
#endif /* RASTER_SOURCE_HPP */
+1 -4
View File
@@ -9,9 +9,7 @@
#include "turn_path.hpp"
#include <limits>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// External (OSM) representation of restriction
@@ -63,7 +61,6 @@ struct TurnRestriction
static std::string Name() { return "turn restriction"; };
};
} // namespace extractor
} // namespace osrm
#endif // RESTRICTION_HPP
+1 -4
View File
@@ -9,9 +9,7 @@
#include <unordered_map>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct TurnRestriction;
@@ -131,7 +129,6 @@ struct RestrictionGraph
RestrictionGraph constructRestrictionGraph(const std::vector<TurnRestriction> &turn_restrictions);
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_RESTRICTION_GRAPH_HPP_
+1 -4
View File
@@ -15,9 +15,7 @@ namespace osmium
class Relation;
} // namespace osmium
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ScriptingEnvironment;
@@ -56,7 +54,6 @@ class RestrictionParser
std::set<std::string> restrictions;
osmium::tags::KeyFilter filter;
};
} // namespace extractor
} // namespace osrm
#endif /* RESTRICTION_PARSER_HPP */
+1 -4
View File
@@ -9,9 +9,7 @@
#include <cstdlib>
#include <string>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Priorities are used to distinguish between how likely a turn is in comparison to a different
@@ -223,7 +221,6 @@ inline bool obviousByRoadClass(const RoadClassification in_classification,
compare_candidate.IsLowPriorityRoadClass());
}
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_CLASSIFICATION_DATA_HPP_
@@ -14,9 +14,7 @@
#include <sol/sol.hpp>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct LuaScriptingContext final
@@ -110,7 +108,6 @@ class Sol2ScriptingEnvironment final : public ScriptingEnvironment
tbb::enumerable_thread_specific<std::unique_ptr<LuaScriptingContext>> script_contexts;
const LocationDependentData location_dependent_data;
};
} // namespace extractor
} // namespace osrm
#endif /* SCRIPTING_ENVIRONMENT_LUA_HPP */
+1 -4
View File
@@ -17,9 +17,7 @@
#include <string>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class CompressedEdgeContainer;
@@ -225,7 +223,6 @@ template <storage::Ownership Ownership> class SegmentDataContainerImpl
using SegmentDataView = detail::SegmentDataContainerImpl<storage::Ownership::View>;
using SegmentDataContainer = detail::SegmentDataContainerImpl<storage::Ownership::Container>;
} // namespace extractor
} // namespace osrm
#endif
+1 -7
View File
@@ -17,11 +17,7 @@
#include <boost/assert.hpp>
namespace osrm
{
namespace extractor
{
namespace serialization
namespace osrm::extractor::serialization
{
// read/write for bearing data
@@ -222,8 +218,6 @@ inline void read(storage::tar::FileReader &reader,
std::string buffer;
util::serialization::read(reader, name, name_table.indexed_data);
}
} // namespace serialization
} // namespace extractor
} // namespace osrm
#endif
+1 -4
View File
@@ -6,9 +6,7 @@
#include <unordered_set>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
class ScriptingEnvironment;
@@ -39,7 +37,6 @@ class SuffixTable final
std::unordered_set<std::string_view> suffix_set;
};
} /* namespace extractor */
} /* namespace osrm */
#endif /* OSRM_EXTRACTOR_SUFFIX_LIST_HPP_ */
+1 -4
View File
@@ -22,9 +22,7 @@
#include <stack>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
template <typename GraphT> class TarjanSCC
@@ -180,7 +178,6 @@ template <typename GraphT> class TarjanSCC
unsigned GetComponentID(const NodeID node) const { return components_index[node]; }
};
} // namespace extractor
} // namespace osrm
#endif /* TARJAN_SCC_HPP */
+1 -9
View File
@@ -1,12 +1,7 @@
#ifndef OSRM_EXTRACTOR_TRAFFIC_LIGHTS_DATA_HPP_
#define OSRM_EXTRACTOR_TRAFFIC_LIGHTS_DATA_HPP_
namespace osrm
{
namespace extractor
{
namespace TrafficLightClass
namespace osrm::extractor::TrafficLightClass
{
// The traffic light annotation is extracted from node tags.
// The directions in which the traffic light applies are relative to the way containing the node.
@@ -17,9 +12,6 @@ enum Direction
DIRECTION_FORWARD = 2,
DIRECTION_REVERSE = 3
};
} // namespace TrafficLightClass
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_TRAFFIC_LIGHTS_DATA_HPP_
+1 -4
View File
@@ -6,9 +6,7 @@
#include <boost/functional/hash.hpp>
#include <unordered_set>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct TrafficSignals
@@ -22,7 +20,6 @@ struct TrafficSignals
return bidirectional_nodes.count(to) > 0 || unidirectional_segments.count({from, to}) > 0;
}
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP
+1 -4
View File
@@ -31,9 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cstdint>
#include <string>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// This is a char instead of a typed enum, so that we can
@@ -103,7 +101,6 @@ inline std::string travelModeToString(const TravelMode mode)
return token;
}
} // namespace extractor
} // namespace osrm
#endif /* TRAVEL_MODE_HPP */
+1 -4
View File
@@ -13,9 +13,7 @@
#include <numeric> //partial_sum
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
namespace TurnLaneType
@@ -100,7 +98,6 @@ inline TurnLanesIndexedArray transformTurnLaneMapIntoArrays(const LaneDescriptio
return std::make_tuple(std::move(turn_lane_offsets), std::move(turn_lane_masks));
}
} // namespace extractor
} // namespace osrm
#endif /* OSRM_GUIDANCE_TURN_LANE_TYPES_HPP_ */
+1 -4
View File
@@ -7,9 +7,7 @@
#include <mapbox/variant.hpp>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Outside view of the variant, these are equal to the `which()` results
@@ -264,6 +262,5 @@ struct TurnPath
};
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_TURN_PATH_HPP
+1 -4
View File
@@ -6,9 +6,7 @@
#include <unordered_map>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
struct TurnPath;
@@ -48,7 +46,6 @@ class TurnPathCompressor
std::unordered_multimap<NodeID, TurnPath *> ends;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_TURN_PATH_COMPRESSOR_HPP_
+1 -4
View File
@@ -6,9 +6,7 @@
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// To avoid handling invalid turn paths / creating unnecessary duplicate nodes for via-ways, we do
@@ -16,7 +14,6 @@ namespace extractor
// `restrictions = removeInvalidRestrictions(std::move(restrictions))`
template <typename T>
std::vector<T> removeInvalidTurnPaths(std::vector<T>, const util::NodeBasedDynamicGraph &);
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_TURN_PATH_FILTER_HPP_
+1 -4
View File
@@ -11,9 +11,7 @@
#include <utility>
#include <vector>
namespace osrm
{
namespace extractor
namespace osrm::extractor
{
// Given the compressed representation of via-way turn restrictions, we provide a fast access into
@@ -69,7 +67,6 @@ class WayRestrictionMap
const RestrictionGraph &restriction_graph;
};
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_WAY_RESTRICTION_MAP_HPP_