Fix formatting.

This commit is contained in:
Daniel Patterson 2023-10-05 22:34:06 -07:00
parent 8ae5d85604
commit eb6f49ca2c
No known key found for this signature in database
GPG Key ID: 19C12BE1725A028B
2 changed files with 18 additions and 15 deletions

View File

@ -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;
}

View File

@ -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;
}