Enable more clang-tidy checks. (#6270)

* Enable more clang-tidy checks
This commit is contained in:
Siarhei Fedartsou
2022-06-30 15:32:12 +02:00
committed by GitHub
parent 59953172e8
commit 3d2db20777
35 changed files with 69 additions and 79 deletions
@@ -3,7 +3,7 @@
#include "partitioner/bisection_to_partition.hpp"
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL(range.end() - range.begin(), ref)
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL((range).end() - (range).begin(), ref)
#define CHECK_EQUAL_RANGE(range, ref) \
do \
{ \
+5 -6
View File
@@ -7,8 +7,6 @@
#include <algorithm>
#include <vector>
using namespace osrm::util;
struct EdgeWithSomeAdditionalData
{
NodeID source;
@@ -16,16 +14,17 @@ struct EdgeWithSomeAdditionalData
unsigned important_data;
};
inline Coordinate
inline osrm::util::Coordinate
makeCoordinate(int x, int y, double step_size, double offset_x = 0, double offset_y = 0)
{
return {FloatLongitude{offset_x + x * step_size}, FloatLatitude{offset_y + y * step_size}};
return {osrm::util::FloatLongitude{offset_x + x * step_size},
osrm::util::FloatLatitude{offset_y + y * step_size}};
}
std::vector<Coordinate> inline makeGridCoordinates(
std::vector<osrm::util::Coordinate> inline makeGridCoordinates(
int rows, int columns, double step_size, double lon_base, double lat_base)
{
std::vector<Coordinate> result;
std::vector<osrm::util::Coordinate> result;
for (int r = 0; r < rows; ++r)
for (int c = 0; c < columns; ++c)
@@ -8,7 +8,7 @@
#include "partitioner/multi_level_partition.hpp"
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL(range.second - range.first, ref)
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL((range).second - (range).first, ref)
#define CHECK_EQUAL_RANGE(range, ref) \
do \
{ \
@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(dividing_four_grid_cells)
RecursiveBisection bisection(graph, 120, 1.1, 0.25, 10, 1);
const auto result = bisection.BisectionIDs();
const auto &result = bisection.BisectionIDs();
// all same IDs withing a group
for (int i = 0; i < 4; ++i)
for (int j = 0; j < rows * cols; ++j)
@@ -5,7 +5,7 @@
#include "util/static_graph.hpp"
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL(range.end() - range.begin(), ref)
#define CHECK_SIZE_RANGE(range, ref) BOOST_CHECK_EQUAL((range).end() - (range).begin(), ref)
#define CHECK_EQUAL_RANGE(range, ref) \
do \
{ \