Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Harris committed Jun 18, 2024
1 parent b296ced commit c79bb69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Core/include/Acts/Navigation/DetectorNavigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class DetectorNavigator {
std::shared_ptr<const Logger> _logger =
getDefaultLogger("DetectorNavigator",
Logging::Level::INFO))
: m_cfg{cfg}, m_logger{std::move(_logger)} {}
: m_cfg{std::move(cfg)}, m_logger{std::move(_logger)} {}

State makeState(const Surface* startSurface,
const Surface* targetSurface) const {
Expand Down Expand Up @@ -158,14 +158,14 @@ class DetectorNavigator {
ACTS_VERBOSE("Assigning detector from the config.");
nState.currentDetector = m_cfg.detector;
if (m_cfg.frustumNavigator) {
if (!m_cfg.topBox) {
if (m_cfg.topBox == nullptr) {
throw std::invalid_argument(
"DetectorNavigator: no octree assigned for frustum navigator");
}
ACTS_VERBOSE("Assigning top box of the octree for frustum navigator.");
nState.topBox = m_cfg.topBox;
nState.frustum = m_cfg.frustum;
} else if (m_cfg.topBox) {
} else if (m_cfg.topBox != nullptr) {
throw std::invalid_argument(
"DetectorNavigator: octree assigned but frustum navigator not "
"enabled");
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Navigation/InternalNavigation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct FrustumNavigation : public IInternalNavigation {
if (nState.surfaceCandidates.empty()) {
// Fill internal portals if existing
auto topBoxCopy = nState.topBox;
while (topBoxCopy) {
while (topBoxCopy != nullptr) {
if (topBoxCopy->intersect(*nState.frustum)) {
if (topBoxCopy->hasEntity()) {
const auto& portals = topBoxCopy->entity()->portals();
Expand Down

0 comments on commit c79bb69

Please sign in to comment.