Skip to content

Commit

Permalink
trying to assert
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Sep 8, 2024
1 parent b217434 commit bafc568
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Core/include/Acts/Navigation/MultiLayerNavigation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@ class MultiLayerNavigation : public IInternalNavigation {
std::vector<const Acts::Surface*>& surfaces) const {
// sorting the surfaces according to their radial distance
std::ranges::sort(surfaces, {}, [&gctx](const auto& s) {
// copy to prevent problem with uninitialised variables
auto centerX = s->center(gctx).x();
auto centerY = s->center(gctx).y();
auto centerZ = s->center(gctx).z();
return std::tie(centerX, centerY, centerZ);
assert(surface != nullptr && "Uninitialized surface");
const auto& center = s->center(gctx);
return std::tie(center.x(), center.y(), center.z());
});

// Remove the duplicates
Expand Down

0 comments on commit bafc568

Please sign in to comment.