Configure clang-tidy job on CI (#6261)

This commit is contained in:
Siarhei Fedartsou
2022-06-28 01:14:28 +02:00
committed by GitHub
parent 79d4363d59
commit 59953172e8
22 changed files with 138 additions and 13 deletions
@@ -22,7 +22,7 @@ namespace datafacade
/**
* This allocator uses file backed mmap memory block as the data location.
*/
class MMapMemoryAllocator : public ContiguousBlockAllocator
class MMapMemoryAllocator final : public ContiguousBlockAllocator
{
public:
explicit MMapMemoryAllocator(const storage::StorageConfig &config);
@@ -20,7 +20,7 @@ namespace datafacade
* This class holds a unique_ptr to the memory block, so it
* is auto-freed upon destruction.
*/
class ProcessMemoryAllocator : public ContiguousBlockAllocator
class ProcessMemoryAllocator final : public ContiguousBlockAllocator
{
public:
explicit ProcessMemoryAllocator(const storage::StorageConfig &config);
@@ -20,7 +20,7 @@ namespace datafacade
* Many SharedMemoryDataFacade objects can be created that point to the same shared
* memory block.
*/
class SharedMemoryAllocator : public ContiguousBlockAllocator
class SharedMemoryAllocator final : public ContiguousBlockAllocator
{
public:
explicit SharedMemoryAllocator(
+2
View File
@@ -467,11 +467,13 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
const auto forward_geometry = datafacade.GetUncompressedForwardGeometry(geometry_id);
const auto forward_weight_offset =
// NOLINTNEXTLINE(bugprone-fold-init-type)
std::accumulate(forward_weights.begin(),
forward_weights.begin() + data.fwd_segment_position,
EdgeWeight{0});
const auto forward_duration_offset =
// NOLINTNEXTLINE(bugprone-fold-init-type)
std::accumulate(forward_durations.begin(),
forward_durations.begin() + data.fwd_segment_position,
EdgeDuration{0});
@@ -304,6 +304,7 @@ InternalRouteResult shortestPathSearch(SearchEngineData<Algorithm> &engine_worki
{
BOOST_ASSERT(target_phantom.IsValidReverseTarget());
new_total_weight_to_reverse = new_total_weight_to_forward;
// NOLINTNEXTLINE(bugprone-use-after-move)
packed_leg_to_reverse = std::move(packed_leg_to_forward);
new_total_weight_to_forward = INVALID_EDGE_WEIGHT;
@@ -354,6 +355,7 @@ InternalRouteResult shortestPathSearch(SearchEngineData<Algorithm> &engine_worki
{
bool forward_to_forward =
(new_total_weight_to_forward != INVALID_EDGE_WEIGHT) &&
// NOLINTNEXTLINE(bugprone-use-after-move)
packed_leg_to_forward.front() == source_phantom.forward_segment_id.id;
bool reverse_to_forward =
(new_total_weight_to_forward != INVALID_EDGE_WEIGHT) &&