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