Skip to content

Commit 95c4523

Browse files
authored
Merge pull request #6480 from Project-OSRM/nested_namespace
Nested namespace
2 parents 1204b74 + 26987f9 commit 95c4523

File tree

457 files changed

+930
-2938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

457 files changed

+930
-2938
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Checks: >
4949
-misc-misplaced-const,
5050
-misc-definitions-in-headers,
5151
-misc-unused-parameters,
52+
modernize-concat-nested-namespaces,
53+
modernize-use-using,
5254
performance-*,
5355
-performance-noexcept-move-constructor,
5456
-performance-no-int-to-ptr,

include/contractor/contract_excludable_graph.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
#include "contractor/graph_contractor_adaptors.hpp"
88
#include "contractor/query_graph.hpp"
99

10-
namespace osrm
11-
{
12-
namespace contractor
10+
namespace osrm::contractor
1311
{
1412

1513
using GraphAndFilter = std::tuple<QueryGraph, std::vector<std::vector<bool>>>;
@@ -94,7 +92,6 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_,
9492
return GraphAndFilter{QueryGraph{num_nodes, edge_container.edges},
9593
edge_container.MakeEdgeFilters()};
9694
}
97-
} // namespace contractor
98-
} // namespace osrm
95+
} // namespace osrm::contractor
9996

10097
#endif

include/contractor/contracted_edge_container.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
#include <numeric>
1515
#include <vector>
1616

17-
namespace osrm
18-
{
19-
namespace contractor
17+
namespace osrm::contractor
2018
{
2119

2220
struct ContractedEdgeContainer
@@ -164,7 +162,6 @@ struct ContractedEdgeContainer
164162
std::vector<MergedFlags> flags;
165163
std::vector<QueryEdge> edges;
166164
};
167-
} // namespace contractor
168-
} // namespace osrm
165+
} // namespace osrm::contractor
169166

170167
#endif

include/contractor/contracted_metric.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
#include "contractor/query_graph.hpp"
55

6-
namespace osrm
7-
{
8-
namespace contractor
6+
namespace osrm::contractor
97
{
108

119
namespace detail
@@ -19,7 +17,6 @@ template <storage::Ownership Ownership> struct ContractedMetric
1917

2018
using ContractedMetric = detail::ContractedMetric<storage::Ownership::Container>;
2119
using ContractedMetricView = detail::ContractedMetric<storage::Ownership::View>;
22-
} // namespace contractor
23-
} // namespace osrm
20+
} // namespace osrm::contractor
2421

2522
#endif

include/contractor/contractor.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030

3131
#include "contractor/contractor_config.hpp"
3232

33-
namespace osrm
34-
{
35-
namespace contractor
33+
namespace osrm::contractor
3634
{
3735

3836
/// Base class of osrm-contract
@@ -49,7 +47,6 @@ class Contractor
4947
private:
5048
ContractorConfig config;
5149
};
52-
} // namespace contractor
53-
} // namespace osrm
50+
} // namespace osrm::contractor
5451

5552
#endif // PROCESSING_CHAIN_HPP

include/contractor/contractor_config.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535

3636
#include <string>
3737

38-
namespace osrm
39-
{
40-
namespace contractor
38+
namespace osrm::contractor
4139
{
4240

4341
struct ContractorConfig final : storage::IOConfig
@@ -71,7 +69,6 @@ struct ContractorConfig final : storage::IOConfig
7169
//(e.g. 0.8 contracts 80 percent of the hierarchy, leaving a core of 20%)
7270
double core_factor = 1.0;
7371
};
74-
} // namespace contractor
75-
} // namespace osrm
72+
} // namespace osrm::contractor
7673

7774
#endif // EXTRACTOR_OPTIONS_HPP

include/contractor/contractor_graph.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
#include "util/dynamic_graph.hpp"
55
#include <algorithm>
66

7-
namespace osrm
8-
{
9-
namespace contractor
7+
namespace osrm::contractor
108
{
119

1210
struct ContractorEdgeData
@@ -42,7 +40,6 @@ struct ContractorEdgeData
4240
using ContractorGraph = util::DynamicGraph<ContractorEdgeData>;
4341
using ContractorEdge = ContractorGraph::InputEdge;
4442

45-
} // namespace contractor
46-
} // namespace osrm
43+
} // namespace osrm::contractor
4744

4845
#endif // OSRM_CONTRACTOR_CONTRACTOR_GRAPH_HPP_

include/contractor/contractor_heap.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
#include "util/typedefs.hpp"
66
#include "util/xor_fast_hash_storage.hpp"
77

8-
namespace osrm
9-
{
10-
namespace contractor
8+
namespace osrm::contractor
119
{
1210
struct ContractorHeapData
1311
{
@@ -24,7 +22,6 @@ using ContractorHeap = util::QueryHeap<NodeID,
2422
ContractorHeapData,
2523
util::XORFastHashStorage<NodeID, NodeID>>;
2624

27-
} // namespace contractor
28-
} // namespace osrm
25+
} // namespace osrm::contractor
2926

3027
#endif // OSRM_CONTRACTOR_CONTRACTOR_HEAP_HPP_

include/contractor/contractor_search.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
#include <cstddef>
1010

11-
namespace osrm
12-
{
13-
namespace contractor
11+
namespace osrm::contractor
1412
{
1513

1614
void search(ContractorHeap &heap,
@@ -20,7 +18,6 @@ void search(ContractorHeap &heap,
2018
const EdgeWeight weight_limit,
2119
const NodeID forbidden_node);
2220

23-
} // namespace contractor
24-
} // namespace osrm
21+
} // namespace osrm::contractor
2522

2623
#endif // OSRM_CONTRACTOR_DIJKSTRA_HPP

include/contractor/crc32_processor.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
#include <iterator>
1111

12-
namespace osrm
13-
{
14-
namespace contractor
12+
namespace osrm::contractor
1513
{
1614

1715
class IteratorbasedCRC32
@@ -125,7 +123,6 @@ struct RangebasedCRC32
125123
private:
126124
IteratorbasedCRC32 crc32;
127125
};
128-
} // namespace contractor
129-
} // namespace osrm
126+
} // namespace osrm::contractor
130127

131128
#endif /* ITERATOR_BASED_CRC32_H */

0 commit comments

Comments
 (0)