Use nested namespace
It's a mechanical change to modernize the code base
This commit is contained in:
@@ -7,9 +7,7 @@
|
||||
using namespace osrm;
|
||||
using namespace osrm::contractor;
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace contractor
|
||||
namespace osrm::contractor
|
||||
{
|
||||
|
||||
bool operator!=(const QueryEdge &lhs, const QueryEdge &rhs) { return !(lhs == rhs); }
|
||||
@@ -27,7 +25,6 @@ std::ostream &operator<<(std::ostream &out, const QueryEdge &edge)
|
||||
out << "{" << edge.source << ", " << edge.target << ", " << edge.data << "}";
|
||||
return out;
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(contracted_edge_container)
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
#include "contractor/contractor_graph.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace unit_test
|
||||
namespace osrm::unit_test
|
||||
{
|
||||
|
||||
using TestEdge = std::tuple<unsigned, unsigned, int>;
|
||||
@@ -38,7 +36,6 @@ inline contractor::ContractorGraph makeGraph(const std::vector<TestEdge> &edges)
|
||||
|
||||
return contractor::ContractorGraph{max_id + 1, input_edges};
|
||||
}
|
||||
} // namespace unit_test
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,21 +5,13 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
namespace osrm
|
||||
namespace osrm::engine
|
||||
{
|
||||
namespace engine
|
||||
{
|
||||
namespace routing_algorithms
|
||||
{
|
||||
|
||||
// Declare offline data facade algorithm
|
||||
namespace offline
|
||||
namespace routing_algorithms::offline
|
||||
{
|
||||
struct Algorithm final
|
||||
{
|
||||
};
|
||||
} // namespace offline
|
||||
|
||||
} // namespace routing_algorithms
|
||||
|
||||
// Define engine data for offline data facade
|
||||
@@ -332,9 +324,7 @@ class ContiguousInternalMemoryDataFacade<routing_algorithms::offline::Algorithm>
|
||||
} // namespace datafacade
|
||||
|
||||
// Fallback to MLD algorithm: requires from data facade MLD specific members
|
||||
namespace routing_algorithms
|
||||
{
|
||||
namespace offline
|
||||
namespace routing_algorithms::offline
|
||||
{
|
||||
|
||||
template <typename PhantomT>
|
||||
@@ -371,10 +361,8 @@ void unpackPath(const FacadeT &facade,
|
||||
mld::unpackPath(facade, packed_path_begin, packed_path_end, endpoints, unpacked_path);
|
||||
}
|
||||
|
||||
} // namespace offline
|
||||
} // namespace routing_algorithms
|
||||
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(offline_facade)
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
#include "util/guidance/entry_class.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace test
|
||||
namespace osrm::test
|
||||
{
|
||||
|
||||
class MockBaseDataFacade : public engine::datafacade::BaseDataFacade
|
||||
@@ -260,7 +258,6 @@ class MockDataFacade final : public MockBaseDataFacade, public MockAlgorithmData
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace osrm
|
||||
|
||||
#endif // MOCK_DATAFACADE_HPP
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
||||
namespace test
|
||||
namespace osrm::test
|
||||
{
|
||||
|
||||
// a mock implementation of the scripting environment doing exactly nothing
|
||||
@@ -50,7 +47,6 @@ class MockScriptingEnvironment : public extractor::ScriptingEnvironment
|
||||
bool HasLocationDependentData() const override { return false; };
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace osrm
|
||||
|
||||
#endif // MOCK_SCRIPTING_ENVIRONMENT_HPP_
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace engine
|
||||
namespace osrm::engine
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
@@ -60,7 +58,6 @@ inline std::ostream &operator<<(std::ostream &out, Approach approach)
|
||||
out << static_cast<int>(approach);
|
||||
return out;
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
#include <fstream>
|
||||
|
||||
// needed for BOOST_CHECK_EQUAL
|
||||
namespace osrm
|
||||
{
|
||||
namespace server
|
||||
{
|
||||
namespace api
|
||||
namespace osrm::server::api
|
||||
{
|
||||
std::ostream &operator<<(std::ostream &out, const osrm::server::api::ParsedURL &url)
|
||||
{
|
||||
@@ -15,8 +11,6 @@ std::ostream &operator<<(std::ostream &out, const osrm::server::api::ParsedURL &
|
||||
|
||||
return out;
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace server
|
||||
} // namespace osrm
|
||||
|
||||
#include <boost/test/test_tools.hpp>
|
||||
|
||||
Reference in New Issue
Block a user