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
+2 -1
View File
@@ -108,8 +108,9 @@ std::vector<CellMetric> customizeFilteredMetrics(const partitioner::MultiLevelEd
const std::vector<std::vector<bool>> &node_filters)
{
std::vector<CellMetric> metrics;
metrics.reserve(node_filters.size());
for (auto filter : node_filters)
for (const auto &filter : node_filters)
{
auto metric = storage.MakeMetric();
customizer.Customize(graph, storage, filter, metric);
+1 -2
View File
@@ -19,7 +19,6 @@
#include <utility>
#include <vector>
namespace TurnType = osrm::guidance::TurnType;
using TurnInstruction = osrm::guidance::TurnInstruction;
namespace osrm
@@ -242,7 +241,7 @@ util::json::Object makeWaypoint(const util::Coordinate &location,
std::string name,
const Hint &hint)
{
auto waypoint = makeWaypoint(location, distance, name);
auto waypoint = makeWaypoint(location, distance, std::move(name));
waypoint.values["hint"] = hint.ToBase64();
return waypoint;
}
@@ -5,8 +5,6 @@
#include <boost/range/adaptors.hpp>
using osrm::util::angularDeviation;
namespace osrm
{
namespace extractor
-3
View File
@@ -2,9 +2,6 @@
#include "util/assert.hpp"
using osrm::guidance::getTurnDirection;
using osrm::util::angularDeviation;
namespace osrm
{
namespace guidance
+1 -1
View File
@@ -684,7 +684,7 @@ bool TurnHandler::isCompatibleByRoadClass(const Intersection &intersection, cons
boost::optional<TurnHandler::Fork> TurnHandler::findFork(const EdgeID via_edge,
Intersection &intersection) const
{
const auto fork = findForkCandidatesByGeometry(intersection);
auto fork = findForkCandidatesByGeometry(intersection);
if (fork)
{
// makes sure that the fork is isolated from other neighbouring streets on the left and
+1 -1
View File
@@ -88,7 +88,7 @@ DinicMaxFlow::MinCut DinicMaxFlow::operator()(const BisectionGraphView &view,
// heuristic)
for (auto s : source_nodes)
levels[s] = 0;
const auto cut = MakeCut(view, levels, flow_value);
auto cut = MakeCut(view, levels, flow_value);
return cut;
}
} while (true);
+1 -1
View File
@@ -504,7 +504,7 @@ bool IsRestrictionValid(const Timezoner &tz_handler, const extractor::Conditiona
std::vector<std::uint64_t>
updateConditionalTurns(std::vector<TurnPenalty> &turn_weight_penalties,
const std::vector<extractor::ConditionalTurnPenalty> &conditional_turns,
Timezoner time_zone_handler)
const Timezoner &time_zone_handler)
{
std::vector<std::uint64_t> updated_turns;
if (conditional_turns.size() == 0)
-1
View File
@@ -31,7 +31,6 @@ namespace detail
namespace
{
namespace ph = boost::phoenix;
namespace qi = boost::spirit::qi;
} // namespace