Fix formatting.
This commit is contained in:
parent
8ae5d85604
commit
eb6f49ca2c
@ -888,19 +888,20 @@ CoordinateExtractor::PrepareLengthCache(const std::vector<util::Coordinate> &coo
|
||||
// sentinel
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value)
|
||||
// We're only interested in the side effect of the lambda, not the return value
|
||||
[[maybe_unused]] auto _ = std::find_if(std::next(std::begin(coordinates)),
|
||||
std::end(coordinates),
|
||||
[last_coordinate = coordinates.front(),
|
||||
limit,
|
||||
&segment_distances,
|
||||
accumulated_distance = 0.](const util::Coordinate current_coordinate) mutable {
|
||||
const auto distance = util::coordinate_calculation::greatCircleDistance(
|
||||
last_coordinate, current_coordinate);
|
||||
accumulated_distance += distance;
|
||||
last_coordinate = current_coordinate;
|
||||
segment_distances.push_back(distance);
|
||||
return accumulated_distance >= limit;
|
||||
});
|
||||
[[maybe_unused]] auto _ = std::find_if(
|
||||
std::next(std::begin(coordinates)),
|
||||
std::end(coordinates),
|
||||
[last_coordinate = coordinates.front(),
|
||||
limit,
|
||||
&segment_distances,
|
||||
accumulated_distance = 0.](const util::Coordinate current_coordinate) mutable {
|
||||
const auto distance = util::coordinate_calculation::greatCircleDistance(
|
||||
last_coordinate, current_coordinate);
|
||||
accumulated_distance += distance;
|
||||
last_coordinate = current_coordinate;
|
||||
segment_distances.push_back(distance);
|
||||
return accumulated_distance >= limit;
|
||||
});
|
||||
return segment_distances;
|
||||
}
|
||||
|
||||
@ -1091,7 +1092,8 @@ CoordinateExtractor::SampleCoordinates(const std::vector<util::Coordinate> &coor
|
||||
};
|
||||
|
||||
// misuse of adjacent_find. Loop over coordinates, until a total sample length is reached
|
||||
[[maybe_unused]] auto _ = std::adjacent_find(coordinates.begin(), coordinates.end(), add_samples_until_length_limit);
|
||||
[[maybe_unused]] auto _ =
|
||||
std::adjacent_find(coordinates.begin(), coordinates.end(), add_samples_until_length_limit);
|
||||
|
||||
return sampled_coordinates;
|
||||
}
|
||||
|
||||
@ -323,7 +323,8 @@ double findClosestDistance(const std::vector<Coordinate> &lhs, const std::vector
|
||||
return false;
|
||||
};
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value)
|
||||
[[maybe_unused]] auto _ = std::find_if(std::begin(lhs), std::end(lhs), compute_minimum_distance_in_rhs);
|
||||
[[maybe_unused]] auto _ =
|
||||
std::find_if(std::begin(lhs), std::end(lhs), compute_minimum_distance_in_rhs);
|
||||
return current_min;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user