Skip to content

Commit

Permalink
remove post step return
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Dec 21, 2023
1 parent 8394535 commit 5a2ab0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
10 changes: 4 additions & 6 deletions Core/include/Acts/Propagator/TryAllNavigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,15 @@ class TryAllNavigator {
/// @return Boolean to indicate if we continue with the actors and
/// aborters or if we should target again.
template <typename propagator_state_t, typename stepper_t>
bool postStep(propagator_state_t& state, const stepper_t& stepper) const {
void postStep(propagator_state_t& state, const stepper_t& stepper) const {
ACTS_VERBOSE(volInfo(state) << "post step");

assert(state.navigation.currentSurface == nullptr &&
"Current surface must be reset.");

if (state.navigation.intersectionCandidates.empty()) {
ACTS_VERBOSE(volInfo(state) << "no intersections.");
return true;
return;
}

std::vector<detail::IntersectionCandidate> hitCandidates;
Expand All @@ -355,7 +355,7 @@ class TryAllNavigator {

if (hitCandidates.empty()) {
ACTS_VERBOSE(volInfo(state) << "Staying focussed on surface.");
return true;
return;
}

state.navigation.intersectionCandidates.clear();
Expand Down Expand Up @@ -389,7 +389,7 @@ class TryAllNavigator {
if (trueHitCandidates.empty()) {
ACTS_VERBOSE(volInfo(state)
<< "Surface successfully hit, but outside bounds.");
return true;
return;
}

if (trueHitCandidates.size() > 1) {
Expand Down Expand Up @@ -429,8 +429,6 @@ class TryAllNavigator {
} else {
ACTS_ERROR(volInfo(state) << "Unknown intersection type");
}

return true;
}

private:
Expand Down
16 changes: 4 additions & 12 deletions Core/include/Acts/Propagator/TryAllOverstepNavigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,12 @@ class TryAllOverstepNavigator {
/// @return Boolean to indicate if we continue with the actors and
/// aborters or if we should target again.
template <typename propagator_state_t, typename stepper_t>
bool postStep(propagator_state_t& state, const stepper_t& stepper) const {
void postStep(propagator_state_t& state, const stepper_t& stepper) const {
ACTS_VERBOSE(volInfo(state) << "post step");

assert(state.navigation.currentSurface == nullptr &&
"Current surface must be reset.");

bool result = true;

if (state.navigation.activeCandidateIndex ==
state.navigation.activeCandidates.size()) {
ACTS_VERBOSE(volInfo(state) << "evaluate blind step");
Expand Down Expand Up @@ -381,10 +379,7 @@ class TryAllOverstepNavigator {

ACTS_VERBOSE(volInfo(state)
<< "Found " << state.navigation.activeCandidates.size()
<< " intersections")

result = state.navigation.activeCandidateIndex ==
state.navigation.activeCandidates.size();
<< " intersections");
}

if (state.navigation.activeCandidateIndex !=
Expand Down Expand Up @@ -415,10 +410,9 @@ class TryAllOverstepNavigator {

if (hitCandidates.empty()) {
ACTS_VERBOSE(volInfo(state) << "Staying focussed on surface.");
return result;
return;
}

result = true;
state.navigation.lastIntersection.reset();

std::vector<detail::IntersectionCandidate> trueHitCandidates;
Expand Down Expand Up @@ -446,7 +440,7 @@ class TryAllOverstepNavigator {
if (trueHitCandidates.empty()) {
ACTS_VERBOSE(volInfo(state)
<< "Surface successfully hit, but outside bounds.");
return true;
return;
}

if (trueHitCandidates.size() > 1) {
Expand Down Expand Up @@ -489,8 +483,6 @@ class TryAllOverstepNavigator {
ACTS_ERROR(volInfo(state) << "Unknown intersection type");
}
}

return result;
}

private:
Expand Down

0 comments on commit 5a2ab0a

Please sign in to comment.