Use nested namespace
It's a mechanical change to modernize the code base
This commit is contained in:
@@ -7,9 +7,7 @@
|
||||
#include "contractor/graph_contractor_adaptors.hpp"
|
||||
#include "contractor/query_graph.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
using GraphAndFilter = std::tuple<QueryGraph, std::vector<std::vector<bool>>>;
|
||||
@@ -94,7 +92,6 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_,
|
||||
return GraphAndFilter{QueryGraph{num_nodes, edge_container.edges},
|
||||
edge_container.MakeEdgeFilters()};
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
struct ContractedEdgeContainer
|
||||
@@ -164,7 +162,6 @@ struct ContractedEdgeContainer
|
||||
std::vector<MergedFlags> flags;
|
||||
std::vector<QueryEdge> edges;
|
||||
};
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
#include "contractor/query_graph.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
namespace detail
|
||||
@@ -19,7 +17,6 @@ template <storage::Ownership Ownership> struct ContractedMetric
|
||||
|
||||
using ContractedMetric = detail::ContractedMetric<storage::Ownership::Container>;
|
||||
using ContractedMetricView = detail::ContractedMetric<storage::Ownership::View>;
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "contractor/contractor_config.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
/// Base class of osrm-contract
|
||||
@@ -49,7 +47,6 @@ class Contractor
|
||||
private:
|
||||
ContractorConfig config;
|
||||
};
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // PROCESSING_CHAIN_HPP
|
||||
|
||||
@@ -35,9 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
struct ContractorConfig final : storage::IOConfig
|
||||
@@ -71,7 +69,6 @@ struct ContractorConfig final : storage::IOConfig
|
||||
//(e.g. 0.8 contracts 80 percent of the hierarchy, leaving a core of 20%)
|
||||
double core_factor = 1.0;
|
||||
};
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // EXTRACTOR_OPTIONS_HPP
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "util/dynamic_graph.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
struct ContractorEdgeData
|
||||
@@ -42,7 +40,6 @@ struct ContractorEdgeData
|
||||
using ContractorGraph = util::DynamicGraph<ContractorEdgeData>;
|
||||
using ContractorEdge = ContractorGraph::InputEdge;
|
||||
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CONTRACTOR_CONTRACTOR_GRAPH_HPP_
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "util/typedefs.hpp"
|
||||
#include "util/xor_fast_hash_storage.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
struct ContractorHeapData
|
||||
{
|
||||
@@ -24,7 +22,6 @@ using ContractorHeap = util::QueryHeap<NodeID,
|
||||
ContractorHeapData,
|
||||
util::XORFastHashStorage<NodeID, NodeID>>;
|
||||
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CONTRACTOR_CONTRACTOR_HEAP_HPP_
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
void search(ContractorHeap &heap,
|
||||
@@ -20,7 +18,6 @@ void search(ContractorHeap &heap,
|
||||
const EdgeWeight weight_limit,
|
||||
const NodeID forbidden_node);
|
||||
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CONTRACTOR_DIJKSTRA_HPP
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
class IteratorbasedCRC32
|
||||
@@ -125,7 +123,6 @@ struct RangebasedCRC32
|
||||
private:
|
||||
IteratorbasedCRC32 crc32;
|
||||
};
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* ITERATOR_BASED_CRC32_H */
|
||||
|
||||
@@ -5,11 +5,7 @@
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
{
|
||||
namespace files
|
||||
namespace osrm::contractor::files
|
||||
{
|
||||
// reads .osrm.hsgr file
|
||||
template <typename ContractedMetricT>
|
||||
@@ -52,8 +48,6 @@ inline void writeGraph(const boost::filesystem::path &path,
|
||||
serialization::write(writer, "/ch/metrics/" + pair.first, pair.second);
|
||||
}
|
||||
}
|
||||
} // namespace files
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
std::vector<bool> contractGraph(ContractorGraph &graph,
|
||||
@@ -37,7 +35,6 @@ inline auto contractGraph(ContractorGraph &graph,
|
||||
graph, {}, std::move(node_is_contractable), std::move(node_weights), core_factor);
|
||||
}
|
||||
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
// Make sure to move in the input edge list!
|
||||
@@ -177,7 +175,6 @@ template <class Edge, typename GraphT> inline std::vector<Edge> toEdges(GraphT g
|
||||
return edges;
|
||||
}
|
||||
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CONTRACTOR_GRAPH_CONTRACTION_ADAPTORS_HPP_
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
struct QueryEdge
|
||||
@@ -77,7 +75,6 @@ struct QueryEdge
|
||||
data.distance == right.data.distance);
|
||||
}
|
||||
};
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // QUERYEDGE_HPP
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
#include "util/static_graph.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
namespace detail
|
||||
@@ -19,7 +17,6 @@ using QueryGraph = util::StaticGraph<typename QueryEdge::EdgeData, Ownership>;
|
||||
|
||||
using QueryGraph = detail::QueryGraph<storage::Ownership::Container>;
|
||||
using QueryGraphView = detail::QueryGraph<storage::Ownership::View>;
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // QUERYEDGE_HPP
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
#include "storage/serialization.hpp"
|
||||
#include "storage/tar.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
{
|
||||
namespace serialization
|
||||
namespace osrm::contractor::serialization
|
||||
{
|
||||
|
||||
template <storage::Ownership Ownership>
|
||||
@@ -46,8 +42,6 @@ void read(storage::tar::FileReader &reader,
|
||||
metric.edge_filter[index]);
|
||||
}
|
||||
}
|
||||
} // namespace serialization
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user