Skip to content

Commit 34a0534

Browse files
authored
chore: rename unused params (acts-project#1952)
- rename `/*unused*/` params into something more understandable - improve doc
1 parent bf5a3fc commit 34a0534

File tree

54 files changed

+144
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+144
-143
lines changed

Core/include/Acts/EventData/Charge.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ struct Neutral {
7777
///
7878
/// This is always `true` as `Neutral` has no internal state.
7979
/// Must be available to provide a consistent interface.
80-
friend constexpr bool operator==(Neutral /*unused*/,
81-
Neutral /*unused*/) noexcept {
80+
friend constexpr bool operator==(Neutral /*lhs*/, Neutral /*rhs*/) noexcept {
8281
return true;
8382
}
8483
};
@@ -110,8 +109,8 @@ struct SinglyCharged {
110109
///
111110
/// This is always `true` as `SinglyCharged` has no internal state.
112111
/// Must be available to provide a consistent interface.
113-
friend constexpr bool operator==(SinglyCharged /*unused*/,
114-
SinglyCharged /*unused*/) noexcept {
112+
friend constexpr bool operator==(SinglyCharged /*lhs*/,
113+
SinglyCharged /*rhs*/) noexcept {
115114
return true;
116115
}
117116
};

Core/include/Acts/Geometry/CuboidVolumeBuilder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class CuboidVolumeBuilder : public ITrackingVolumeBuilder {
181181
/// @return Pointer to the created TrackingGeometry
182182
std::shared_ptr<TrackingVolume> trackingVolume(
183183
const GeometryContext& gctx,
184-
std::shared_ptr<const TrackingVolume> /*unused*/,
185-
std::shared_ptr<const VolumeBounds> /*unused*/) const override;
184+
std::shared_ptr<const TrackingVolume> /*oppositeVolume*/,
185+
std::shared_ptr<const VolumeBounds> /*outsideBounds*/) const override;
186186

187187
private:
188188
/// Configuration of the world volume

Core/include/Acts/Navigation/NavigationStateUpdators.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class IndexedUpdatorImpl : public INavigationDelegate {
136136
/// @param a is the array to be filled
137137
template <typename Array, std::size_t... idx>
138138
void fillCasts(const Vector3& position, Array& a,
139-
std::index_sequence<idx...> /*unused*/) const {
139+
std::index_sequence<idx...> /*indices*/) const {
140140
((a[idx] = VectorHelpers::cast(position, casts[idx])), ...);
141141
}
142142
};

Core/include/Acts/Propagator/detail/GenericDefaultExtension.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ struct GenericDefaultExtension {
3131
/// @tparam stepper_t Type of the stepper
3232
/// @return Boolean flag if the step would be valid
3333
template <typename propagator_state_t, typename stepper_t>
34-
int bid(const propagator_state_t& /*unused*/,
35-
const stepper_t& /*unused*/) const {
34+
int bid(const propagator_state_t& /*state*/,
35+
const stepper_t& /*stepper*/) const {
3636
return 1;
3737
}
3838

Core/include/Acts/Propagator/detail/VoidPropagatorComponents.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct VoidNavigator {
4646
/// Empty call, compiler should optimise that
4747
template <typename propagator_state_t, typename stepper_t>
4848
void status(propagator_state_t& /*state*/,
49-
const stepper_t& /*unused*/) const {}
49+
const stepper_t& /*stepper*/) const {}
5050

5151
/// Navigation call - void
5252
///
@@ -56,7 +56,7 @@ struct VoidNavigator {
5656
/// Empty call, compiler should optimise that
5757
template <typename propagator_state_t, typename stepper_t>
5858
void target(propagator_state_t& /*state*/,
59-
const stepper_t& /*unused*/) const {}
59+
const stepper_t& /*stepper*/) const {}
6060
};
6161

6262
} // namespace detail

Core/src/Detector/DetectorVolume.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Acts::Experimental::DetectorVolume::DetectorVolume(
4646
}
4747

4848
Acts::Experimental::DetectorVolume::DetectorVolume(
49-
const GeometryContext& /*unused*/, const std::string& name,
49+
const GeometryContext& /*gctx*/, const std::string& name,
5050
const Transform3& transform, std::unique_ptr<VolumeBounds> bounds,
5151
SurfaceCandidatesUpdator&& surfaceCandidateUpdator)
5252
: m_name(name),

Core/src/Geometry/CuboidVolumeBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ std::shared_ptr<Acts::TrackingVolume> Acts::CuboidVolumeBuilder::buildVolume(
221221
}
222222

223223
Acts::MutableTrackingVolumePtr Acts::CuboidVolumeBuilder::trackingVolume(
224-
const GeometryContext& gctx, Acts::TrackingVolumePtr /*unused*/,
225-
Acts::VolumeBoundsPtr /*unused*/) const {
224+
const GeometryContext& gctx, Acts::TrackingVolumePtr /*gctx*/,
225+
Acts::VolumeBoundsPtr /*bounds*/) const {
226226
// Build volumes
227227
std::vector<std::shared_ptr<TrackingVolume>> volumes;
228228
volumes.reserve(m_cfg.volumeCfg.size());

Core/src/Geometry/CylinderVolumeHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ bool Acts::CylinderVolumeHelper::estimateAndCheckDimension(
418418
const CylinderVolumeBounds*& cylinderVolumeBounds,
419419
const Transform3& transform, double& rMinClean, double& rMaxClean,
420420
double& zMinClean, double& zMaxClean, BinningValue& bValue,
421-
BinningType /*unused*/) const {
421+
BinningType /*bType*/) const {
422422
// some verbose output
423423

424424
ACTS_VERBOSE("Parsing the " << layers.size()

Core/src/Geometry/GeometryIdentifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ std::ostream& Acts::operator<<(std::ostream& os, Acts::GeometryIdentifier id) {
4040

4141
Acts::GeometryIdentifier Acts::GeometryIdentifierHook::decorateIdentifier(
4242
Acts::GeometryIdentifier identifier,
43-
const Acts::Surface& /*unused*/) const {
43+
const Acts::Surface& /*surface*/) const {
4444
return identifier;
4545
}

Core/src/Surfaces/ConeSurface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Acts::Vector3 Acts::ConeSurface::rotSymmetryAxis(
8181

8282
Acts::RotationMatrix3 Acts::ConeSurface::referenceFrame(
8383
const GeometryContext& gctx, const Vector3& position,
84-
const Vector3& /*unused*/) const {
84+
const Vector3& /*momentum*/) const {
8585
RotationMatrix3 mFrame;
8686
// construct the measurement frame
8787
// measured Y is the local z axis
@@ -102,7 +102,7 @@ Acts::RotationMatrix3 Acts::ConeSurface::referenceFrame(
102102

103103
Acts::Vector3 Acts::ConeSurface::localToGlobal(
104104
const GeometryContext& gctx, const Vector2& lposition,
105-
const Vector3& /*unused*/) const {
105+
const Vector3& /*momentum*/) const {
106106
// create the position in the local 3d frame
107107
double r = lposition[Acts::eBoundLoc1] * bounds().tanAlpha();
108108
double phi = lposition[Acts::eBoundLoc0] / r;
@@ -112,7 +112,7 @@ Acts::Vector3 Acts::ConeSurface::localToGlobal(
112112

113113
Acts::Result<Acts::Vector2> Acts::ConeSurface::globalToLocal(
114114
const GeometryContext& gctx, const Vector3& position,
115-
const Vector3& /*unused*/, double tolerance) const {
115+
const Vector3& /*momentum*/, double tolerance) const {
116116
Vector3 loc3Dframe = transform(gctx).inverse() * position;
117117
double r = loc3Dframe.z() * bounds().tanAlpha();
118118
if (std::abs(perp(loc3Dframe) - r) > tolerance) {

0 commit comments

Comments
 (0)