Fix unused lambda capture warnings
This commit is contained in:
parent
f48dd665ad
commit
97d027a173
@ -79,7 +79,7 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
|
||||
{
|
||||
auto results = rtree.Nearest(
|
||||
input_coordinate,
|
||||
[this, approach, &input_coordinate, bearing, bearing_range, max_distance](
|
||||
[this, approach, &input_coordinate, bearing, bearing_range](
|
||||
const CandidateSegment &segment) {
|
||||
auto use_direction =
|
||||
boolPairAnd(CheckSegmentBearing(segment, bearing, bearing_range),
|
||||
|
@ -534,7 +534,6 @@ void encodeVectorTile(const DataFacadeBase &facade,
|
||||
line_string_index.add(name);
|
||||
|
||||
const auto encode_tile_line = [&line_layer_writer,
|
||||
&edge,
|
||||
&component_id,
|
||||
&id,
|
||||
&max_datasource_id,
|
||||
|
@ -241,7 +241,7 @@ NodeID WayRestrictionMap::RemapIfRestricted(const NodeID edge_based_node,
|
||||
|
||||
// returns true if the ID saved in an iterator belongs to a turn restriction that references
|
||||
// node_based_to as destination of the `in_restriction`
|
||||
const auto restriction_targets_to = [node_based_to, this](const auto &pair) {
|
||||
const auto restriction_targets_to = [node_based_to](const auto &pair) {
|
||||
return pair.second->AsWayRestriction().in_restriction.to == node_based_to;
|
||||
};
|
||||
const auto itr = std::find_if(range.first, range.second, restriction_targets_to);
|
||||
|
@ -143,7 +143,7 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in
|
||||
return intersection[0].angle;
|
||||
};
|
||||
|
||||
const auto getMostLikelyContinue = [this, in_data](const Intersection &intersection) {
|
||||
const auto getMostLikelyContinue = [this](const Intersection &intersection) {
|
||||
double angle = intersection[0].angle;
|
||||
double best = 180;
|
||||
for (const auto &road : intersection)
|
||||
|
@ -145,11 +145,11 @@ typename Intersection::const_iterator findBestMatchForReverse(const TurnLaneType
|
||||
if (neighbor_itr + 1 == intersection.cend())
|
||||
return intersection.begin();
|
||||
|
||||
const TurnLaneType::Mask tag = TurnLaneType::uturn;
|
||||
return std::min_element(
|
||||
intersection.begin() + std::distance(intersection.begin(), neighbor_itr),
|
||||
intersection.end(),
|
||||
[tag](const ConnectedRoad &lhs, const ConnectedRoad &rhs) {
|
||||
[](const ConnectedRoad &lhs, const ConnectedRoad &rhs) {
|
||||
const TurnLaneType::Mask tag = TurnLaneType::uturn;
|
||||
// prefer valid matches
|
||||
if (isValidMatch(tag, lhs.instruction) != isValidMatch(tag, rhs.instruction))
|
||||
return isValidMatch(tag, lhs.instruction);
|
||||
|
@ -74,7 +74,7 @@ DinicMaxFlow::MinCut DinicMaxFlow::operator()(const BisectionGraphView &view,
|
||||
// check if the sink can be reached from the source, it's enough to check the border
|
||||
const auto separated = std::find_if(border_sink_nodes.begin(),
|
||||
border_sink_nodes.end(),
|
||||
[&levels, &view](const auto node) {
|
||||
[&levels](const auto node) {
|
||||
return levels[node] != INVALID_LEVEL;
|
||||
}) == border_sink_nodes.end();
|
||||
|
||||
@ -182,10 +182,10 @@ std::size_t DinicMaxFlow::BlockingFlow(FlowEdges &flow,
|
||||
std::size_t flow_increase = 0;
|
||||
|
||||
// augment the flow along a path in the level graph
|
||||
const auto augment_flow = [&flow, &view](const std::vector<NodeID> &path) {
|
||||
const auto augment_flow = [&flow](const std::vector<NodeID> &path) {
|
||||
|
||||
// add/remove flow edges from the current residual graph
|
||||
const auto augment_one = [&flow, &view](const NodeID from, const NodeID to) {
|
||||
const auto augment_one = [&flow](const NodeID from, const NodeID to) {
|
||||
// check if there is flow in the opposite direction
|
||||
auto existing_edge = flow[to].find(from);
|
||||
if (existing_edge != flow[to].end())
|
||||
|
@ -214,7 +214,7 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
|
||||
using DirectionalGeometryID = extractor::SegmentDataContainer::DirectionalGeometryID;
|
||||
auto range = tbb::blocked_range<DirectionalGeometryID>(0, segment_data.GetNumberOfGeometries());
|
||||
tbb::parallel_for(range, [&, LUA_SOURCE](const auto &range) {
|
||||
tbb::parallel_for(range, [&](const auto &range) {
|
||||
auto &counters = segment_speeds_counters.local();
|
||||
std::vector<double> segment_lengths;
|
||||
for (auto geometry_id = range.begin(); geometry_id < range.end(); geometry_id++)
|
||||
|
Loading…
Reference in New Issue
Block a user