Skip to content

Commit

Permalink
refactor: Remove redundant default-constructor factory for Nav delega…
Browse files Browse the repository at this point in the history
…te (#2741)

The default constructor of `Delegate` already produces an unconnected delegate.
  • Loading branch information
paulgessinger authored Dec 12, 2023
1 parent ff03f7d commit ed4761a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Core/include/Acts/Detector/Portal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ class Portal {
std::shared_ptr<RegularSurface> m_surface;

/// The portal targets along/opposite the normal vector
DetectorVolumeUpdaters m_volumeUpdaters = {unconnectedUpdater(),
unconnectedUpdater()};
DetectorVolumeUpdaters m_volumeUpdaters = {DetectorVolumeUpdater{},
DetectorVolumeUpdater{}};

/// The portal attaches to the following volumes
AttachedDetectorVolumes m_attachedVolumes;
Expand Down
7 changes: 0 additions & 7 deletions Core/include/Acts/Navigation/NavigationDelegates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,5 @@ using DetectorVolumeUpdater =
OwningDelegate<void(const GeometryContext& gctx, NavigationState& nState),
INavigationDelegate>;

/// @brief A dummy constructed updator
inline static DetectorVolumeUpdater unconnectedUpdater() {
DetectorVolumeUpdater unconnected;
unconnected.disconnect();
return unconnected;
}

} // namespace Experimental
} // namespace Acts

0 comments on commit ed4761a

Please sign in to comment.