Update CI to use clang-tidy 14 (#6353)
This commit is contained in:
committed by
GitHub
parent
c003ac1055
commit
96f5780f06
@@ -32,6 +32,8 @@ namespace api
|
||||
class TableAPI final : public BaseAPI
|
||||
{
|
||||
public:
|
||||
virtual ~TableAPI() = default;
|
||||
|
||||
struct TableCellRef
|
||||
{
|
||||
TableCellRef(const std::size_t &row, const std::size_t &column) : row{row}, column{column}
|
||||
|
||||
@@ -31,6 +31,8 @@ template <> class AlgorithmDataFacade<CH>
|
||||
using EdgeData = contractor::QueryEdge::EdgeData;
|
||||
using EdgeRange = util::filtered_range<EdgeID, util::vector_view<bool>>;
|
||||
|
||||
virtual ~AlgorithmDataFacade() = default;
|
||||
|
||||
// search graph access
|
||||
virtual unsigned GetNumberOfNodes() const = 0;
|
||||
|
||||
@@ -66,6 +68,8 @@ template <> class AlgorithmDataFacade<MLD>
|
||||
using EdgeData = customizer::EdgeBasedGraphEdgeData;
|
||||
using EdgeRange = util::range<EdgeID>;
|
||||
|
||||
virtual ~AlgorithmDataFacade() = default;
|
||||
|
||||
// search graph access
|
||||
virtual unsigned GetNumberOfNodes() const = 0;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace engine
|
||||
class RoutingAlgorithmsInterface
|
||||
{
|
||||
public:
|
||||
virtual ~RoutingAlgorithmsInterface() = default;
|
||||
|
||||
virtual InternalManyRoutesResult
|
||||
AlternativePathSearch(const PhantomEndpointCandidates &endpoint_candidates,
|
||||
unsigned number_of_alternatives) const = 0;
|
||||
|
||||
@@ -58,7 +58,7 @@ class RasterGrid
|
||||
for (unsigned int y = 0; y < ydim; y++)
|
||||
{
|
||||
// read one line from file.
|
||||
file_reader.ReadLine(&buffer[0], xdim * 11);
|
||||
file_reader.ReadLine(buffer.data(), xdim * 11);
|
||||
boost::algorithm::trim(buffer);
|
||||
|
||||
std::vector<std::string> result;
|
||||
|
||||
@@ -125,13 +125,13 @@ template <typename NodeEntryT, typename EdgeEntryT> class RemappableGraph
|
||||
|
||||
NodeID GetID(const NodeT &node) const
|
||||
{
|
||||
BOOST_ASSERT(&node >= &nodes[0] && &node <= &nodes.back());
|
||||
return (&node - &nodes[0]);
|
||||
BOOST_ASSERT(&node >= nodes.data() && &node <= &nodes.back());
|
||||
return (&node - nodes.data());
|
||||
}
|
||||
EdgeID GetID(const EdgeT &edge) const
|
||||
{
|
||||
BOOST_ASSERT(&edge >= &edges[0] && &edge <= &edges.back());
|
||||
return (&edge - &edges[0]);
|
||||
BOOST_ASSERT(&edge >= edges.data() && &edge <= &edges.back());
|
||||
return (&edge - edges.data());
|
||||
}
|
||||
|
||||
NodeIterator Begin() { return nodes.begin(); }
|
||||
@@ -142,7 +142,7 @@ template <typename NodeEntryT, typename EdgeEntryT> class RemappableGraph
|
||||
// removes the edges from the graph that return true for the filter, returns new end
|
||||
template <typename FilterT> auto RemoveEdges(NodeT &node, FilterT filter)
|
||||
{
|
||||
BOOST_ASSERT(&node >= &nodes[0] && &node <= &nodes.back());
|
||||
BOOST_ASSERT(&node >= nodes.data() && &node <= &nodes.back());
|
||||
// required since we are not on std++17 yet, otherwise we are missing an argument_type
|
||||
const auto negate_filter = [&](const EdgeT &edge) { return !filter(edge); };
|
||||
const auto center = std::stable_partition(BeginEdges(node), EndEdges(node), negate_filter);
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
#include "util/vector_view.hpp"
|
||||
|
||||
#include "util/filtered_graph.hpp"
|
||||
#include "util/packed_vector.hpp"
|
||||
#include "util/vector_view.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace storage
|
||||
|
||||
@@ -25,7 +25,7 @@ template <typename T> class DistTableWrapper
|
||||
DistTableWrapper(std::vector<T> table, std::size_t number_of_nodes)
|
||||
: table_(std::move(table)), number_of_nodes_(number_of_nodes)
|
||||
{
|
||||
BOOST_ASSERT_MSG(table.size() == 0, "table is empty");
|
||||
BOOST_ASSERT_MSG(!table_.empty(), "table is empty");
|
||||
BOOST_ASSERT_MSG(number_of_nodes_ * number_of_nodes_ <= table_.size(),
|
||||
"number_of_nodes_ is invalid");
|
||||
}
|
||||
|
||||
@@ -126,8 +126,8 @@ class FilteredGraphImpl<util::StaticGraph<EdgeDataT, Ownership>, Ownership>
|
||||
|
||||
FilteredGraphImpl() = default;
|
||||
|
||||
FilteredGraphImpl(Graph graph, Vector<bool> edge_filter_)
|
||||
: graph(std::move(graph)), edge_filter(std::move(edge_filter_))
|
||||
FilteredGraphImpl(Graph graph_, Vector<bool> edge_filter_)
|
||||
: graph(std::move(graph_)), edge_filter(std::move(edge_filter_))
|
||||
{
|
||||
BOOST_ASSERT(edge_filter.empty() || edge_filter.size() == graph.GetNumberOfEdges());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user