From f96dcffe38032bc7415e09cb64684436ffa82d0e Mon Sep 17 00:00:00 2001 From: Paul Gessinger <hello@paulgessinger.com> Date: Fri, 9 Feb 2018 14:29:17 +0100 Subject: [PATCH] Add -Wextra and -Wpedantic Introduces more warnings. Fixes a whole bunch of warnings all over the project. --- Core/include/ACTS/Extrapolation/Wrapper.hpp | 6 ++-- .../ACTS/MagneticField/ConstantBField.hpp | 12 +++---- .../MagneticField/InterpolatedBFieldMap.hpp | 2 +- .../MagneticField/concept/AnyFieldLookup.hpp | 12 +++---- .../detail/condition_uses_result_type.hpp | 22 ++++++------ Core/include/ACTS/Surfaces/InfiniteBounds.hpp | 2 +- .../ACTS/Utilities/concept/AnyGrid.hpp | 30 ++++++++-------- .../Utilities/detail/MPL/type_collector.hpp | 4 +-- .../ACTS/Utilities/detail/grid_helper.hpp | 22 ++++++------ .../Extrapolation/MaterialEffectsEngine.cpp | 20 +++++------ Core/src/Extrapolation/RungeKuttaUtils.cpp | 2 +- Core/src/Surfaces/ConeSurface.cpp | 12 ++++--- Core/src/Surfaces/CylinderSurface.cpp | 10 +++--- Core/src/Surfaces/DiscSurface.cpp | 14 ++++---- Core/src/Surfaces/LineSurface.cpp | 16 +++++---- Core/src/Surfaces/PerigeeSurface.cpp | 6 ++-- Core/src/Surfaces/PlaneSurface.cpp | 4 +-- Core/src/Surfaces/StrawSurface.cpp | 8 ++--- Core/src/Tools/SurfaceArrayCreator.cpp | 8 ++--- Core/src/Utilities/BFieldMapUtils.cpp | 2 +- IntegrationTests/PropagationTestBase.hpp | 4 +++ IntegrationTests/PropagationTestHelper.hpp | 26 +++++++------- .../src/ConvertDD4hepDetector.cpp | 2 -- Tests/EventData/BoundParametersTests.cpp | 5 +++ Tests/Layers/ConeLayerTests.cpp | 4 +-- Tests/Layers/CylinderLayerTests.cpp | 4 +-- Tests/Layers/DiscLayerTests.cpp | 4 +-- .../Layers/GenericApproachDescriptorTests.cpp | 4 +-- Tests/Layers/LayerTests.cpp | 4 +-- Tests/Layers/NavigationLayerTests.cpp | 4 +-- Tests/Layers/PlaneLayerTests.cpp | 4 +-- Tests/MagneticField/ConstantBFieldTests.cpp | 2 ++ Tests/Propagator/RungeKuttaEngineTests.cpp | 4 +-- Tests/Surfaces/BoundaryCheckBenchmark.cpp | 2 +- Tests/Surfaces/BoundaryCheckTests.cpp | 4 +-- Tests/Surfaces/ConeBoundsTests.cpp | 4 +-- Tests/Surfaces/ConeSurfaceTests.cpp | 4 +-- Tests/Surfaces/CylinderBoundsTests.cpp | 6 ++-- Tests/Surfaces/CylinderSurfaceTests.cpp | 5 +-- Tests/Surfaces/DiamondBoundsTests.cpp | 5 +-- Tests/Surfaces/DiscSurfaceTests.cpp | 4 +-- Tests/Surfaces/DiscTrapezoidalBoundsTests.cpp | 4 +-- Tests/Surfaces/EllipseBoundsTests.cpp | 6 ++-- Tests/Surfaces/InfiniteBoundsTests.cpp | 4 +-- Tests/Surfaces/LineBoundsTests.cpp | 6 ++-- Tests/Surfaces/LineSurfaceStub.hpp | 14 ++++---- Tests/Surfaces/LineSurfaceTests.cpp | 4 +-- Tests/Surfaces/PerigeeSurfaceTests.cpp | 4 +-- Tests/Surfaces/PlaneSurfaceTests.cpp | 5 +-- Tests/Surfaces/RadialBoundsTests.cpp | 4 +-- Tests/Surfaces/RectangleBoundsTests.cpp | 4 +-- Tests/Surfaces/StrawSurfaceTests.cpp | 4 +-- Tests/Surfaces/SurfaceBoundsTests.cpp | 8 ++--- Tests/Surfaces/SurfaceStub.hpp | 35 +++++++++---------- Tests/Surfaces/SurfaceTests.cpp | 4 +-- Tests/Surfaces/TrapezoidBoundsTests.cpp | 4 +-- Tests/Surfaces/TriangleBoundsTests.cpp | 4 +-- Tests/Tools/CylinderVolumeBuilderTests.cpp | 4 +++ .../Utilities/RealQuadraticEquationTests.cpp | 4 +-- Tests/Utilities/UnitConversionTests.cpp | 4 +-- Tests/Volumes/CylinderVolumeBoundsTests.cpp | 1 + cmake/ACTSCompilerOptions.cmake | 2 +- 62 files changed, 236 insertions(+), 212 deletions(-) diff --git a/Core/include/ACTS/Extrapolation/Wrapper.hpp b/Core/include/ACTS/Extrapolation/Wrapper.hpp index 42c3b0038..ead7234ce 100644 --- a/Core/include/ACTS/Extrapolation/Wrapper.hpp +++ b/Core/include/ACTS/Extrapolation/Wrapper.hpp @@ -333,9 +333,9 @@ namespace propagation { typename Observers, typename Aborters> WrapperResult<Parameters> - propagate_(Cache& cache, - const Parameters& start, - const Surface& surface, + propagate_(Cache& cache, + const Parameters& /*start*/, + const Surface& surface, const Options<Observers, Aborters>& options) const { // Initialize the propagation result object diff --git a/Core/include/ACTS/MagneticField/ConstantBField.hpp b/Core/include/ACTS/MagneticField/ConstantBField.hpp index 2be6206c1..f98d3115a 100644 --- a/Core/include/ACTS/MagneticField/ConstantBField.hpp +++ b/Core/include/ACTS/MagneticField/ConstantBField.hpp @@ -46,7 +46,7 @@ public: /// /// @note The field is the same everywhere for a constant B-Field Vector3D - getField(const Vector3D& position) const + getField(const Vector3D& /*position*/) const { return m_BField; } @@ -58,7 +58,7 @@ public: /// otherwise @c false /// @note The method will always return true for the constant B-Field bool - isInside(const Vector3D& position) const + isInside(const Vector3D& /*position*/) const { return true; } @@ -94,7 +94,7 @@ public: /// @note The @p position is ignored and only kept as argument to provide /// a consistent interface with other magnetic field services. Vector3D - getField(const Vector3D& position) const + getField(const Vector3D& /*position*/) const { return m_BField; } @@ -105,7 +105,7 @@ public: /// @return field cell containing the given global position /// concept::AnyFieldCell<> - getFieldCell(const Vector3D& position) const + getFieldCell(const Vector3D& /*position*/) const { return m_fieldCell; } @@ -121,8 +121,8 @@ public: /// @note currently the derivative is not calculated /// @todo return derivative Vector3D - getFieldGradient(const Vector3D& position, - ActsMatrixD<3, 3>& derivative) const + getFieldGradient(const Vector3D& /*position*/, + ActsMatrixD<3, 3>& /*derivative*/) const { return m_BField; } diff --git a/Core/include/ACTS/MagneticField/InterpolatedBFieldMap.hpp b/Core/include/ACTS/MagneticField/InterpolatedBFieldMap.hpp index f6852bd2f..edb48f2ab 100644 --- a/Core/include/ACTS/MagneticField/InterpolatedBFieldMap.hpp +++ b/Core/include/ACTS/MagneticField/InterpolatedBFieldMap.hpp @@ -313,7 +313,7 @@ public: /// @todo return derivative Vector3D getFieldGradient(const Vector3D& position, - ActsMatrixD<3, 3>& derivative) const + ActsMatrixD<3, 3>& /*derivative*/) const { return m_config.mapper.getField(position); } diff --git a/Core/include/ACTS/MagneticField/concept/AnyFieldLookup.hpp b/Core/include/ACTS/MagneticField/concept/AnyFieldLookup.hpp index bb648abf9..88ef3e0a1 100644 --- a/Core/include/ACTS/MagneticField/concept/AnyFieldLookup.hpp +++ b/Core/include/ACTS/MagneticField/concept/AnyFieldLookup.hpp @@ -17,12 +17,12 @@ #include "ACTS/Utilities/Definitions.hpp" // clang-format off -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getField), getField, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getFieldCell), getFieldCell, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_isInside), isInside, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getNBins), getNBins, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getMin), getMin, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getMax), getMax, 0); +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getField), getField, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getFieldCell), getFieldCell, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_isInside), isInside, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getNBins), getNBins, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getMin), getMin, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(afl_detail)(has_getMax), getMax, 0) // clang-format on namespace Acts { diff --git a/Core/include/ACTS/Propagator/detail/condition_uses_result_type.hpp b/Core/include/ACTS/Propagator/detail/condition_uses_result_type.hpp index c0491182a..d9900fa89 100644 --- a/Core/include/ACTS/Propagator/detail/condition_uses_result_type.hpp +++ b/Core/include/ACTS/Propagator/detail/condition_uses_result_type.hpp @@ -16,18 +16,16 @@ namespace Acts { namespace detail { - namespace { - template <typename T, bool has_observer = true> - struct condition_uses_result_type_impl - { - static constexpr bool value = has_result_type_v<observer_type_t<T>>; - }; - - template <typename T> - struct condition_uses_result_type_impl<T, false> : std::false_type - { - }; - } // end of anonymous namespace + template <typename T, bool has_observer = true> + struct condition_uses_result_type_impl + { + static constexpr bool value = has_result_type_v<observer_type_t<T>>; + }; + + template <typename T> + struct condition_uses_result_type_impl<T, false> : std::false_type + { + }; template <typename T> struct condition_uses_result_type diff --git a/Core/include/ACTS/Surfaces/InfiniteBounds.hpp b/Core/include/ACTS/Surfaces/InfiniteBounds.hpp index 2d6b0ca6f..abdd76a10 100644 --- a/Core/include/ACTS/Surfaces/InfiniteBounds.hpp +++ b/Core/include/ACTS/Surfaces/InfiniteBounds.hpp @@ -62,7 +62,7 @@ public: /// ignores input parameter /// @return always 0. (should be -NaN) virtual double - distanceToBoundary(const Vector2D& pos) const final override + distanceToBoundary(const Vector2D& /*pos*/) const final override { return 0; } diff --git a/Core/include/ACTS/Utilities/concept/AnyGrid.hpp b/Core/include/ACTS/Utilities/concept/AnyGrid.hpp index 46f303f63..7cd8370ec 100644 --- a/Core/include/ACTS/Utilities/concept/AnyGrid.hpp +++ b/Core/include/ACTS/Utilities/concept/AnyGrid.hpp @@ -17,21 +17,21 @@ #include <set> // clang-format off -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_at), at, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_closestPointsIndices), closestPointsIndices, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_dimensions), dimensions, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getBinCenter), getBinCenter, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getGlobalBinIndex), getGlobalBinIndex, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getLocalBinIndices), getLocalBinIndices, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getLowerLeftBinEdge), getLowerLeftBinEdge, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getUpperRightBinEdge), getUpperRightBinEdge, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_interpolate), interpolate, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_isInside), isInside, 1); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_neighborHoodIndices), neighborHoodIndices, 2); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_size), size, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getNBins), getNBins, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getMin), getMin, 0); -BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getMax), getMax, 0); +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_at), at, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_closestPointsIndices), closestPointsIndices, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_dimensions), dimensions, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getBinCenter), getBinCenter, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getGlobalBinIndex), getGlobalBinIndex, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getLocalBinIndices), getLocalBinIndices, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getLowerLeftBinEdge), getLowerLeftBinEdge, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getUpperRightBinEdge), getUpperRightBinEdge, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_interpolate), interpolate, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_isInside), isInside, 1) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_neighborHoodIndices), neighborHoodIndices, 2) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_size), size, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getNBins), getNBins, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getMin), getMin, 0) +BOOST_TYPE_ERASURE_MEMBER((Acts)(concept)(any_grid_detail)(has_getMax), getMax, 0) // clang-format on namespace Acts { diff --git a/Core/include/ACTS/Utilities/detail/MPL/type_collector.hpp b/Core/include/ACTS/Utilities/detail/MPL/type_collector.hpp index f88867383..d074feaef 100644 --- a/Core/include/ACTS/Utilities/detail/MPL/type_collector.hpp +++ b/Core/include/ACTS/Utilities/detail/MPL/type_collector.hpp @@ -43,7 +43,7 @@ namespace detail { }; public: - HAS_TYPE(result_type); + HAS_TYPE(result_type) template <typename T> using type = typename extractor<T>::type; @@ -59,7 +59,7 @@ namespace detail { }; public: - HAS_TYPE(observer_type); + HAS_TYPE(observer_type) template <typename T> using type = typename extractor<T>::type; diff --git a/Core/include/ACTS/Utilities/detail/grid_helper.hpp b/Core/include/ACTS/Utilities/detail/grid_helper.hpp index 6fbfbc7ab..4cd94ab06 100644 --- a/Core/include/ACTS/Utilities/detail/grid_helper.hpp +++ b/Core/include/ACTS/Utilities/detail/grid_helper.hpp @@ -194,11 +194,11 @@ namespace detail { { template <class... Axes> static void - closestPointsIndices(size_t bin, - size_t area, - bool minimum, - const std::tuple<Axes...>& axes, - std::set<size_t>& closestPointsIndices) + closestPointsIndices(size_t bin, + size_t area, + bool minimum, + const std::tuple<Axes...>& /*axes*/, + std::set<size_t>& closestPointsIndices) { if (not minimum) bin += area; closestPointsIndices.insert(bin); @@ -227,18 +227,18 @@ namespace detail { template <class... Axes> static void getGlobalBin(const std::array<size_t, sizeof...(Axes)>& localBins, - const std::tuple<Axes...>& axes, - size_t& bin, - size_t& area) + const std::tuple<Axes...>& /*axes*/, + size_t& bin, + size_t& area) { bin += area * localBins.at(0u); } template <class... Axes> static void - getLocalBinIndices(size_t& bin, - const std::tuple<Axes...>& axes, - size_t& area, + getLocalBinIndices(size_t& bin, + const std::tuple<Axes...>& /*axes*/, + size_t& area, std::array<size_t, sizeof...(Axes)>& indices) { // make sure to account for under-/overflow bins diff --git a/Core/src/Extrapolation/MaterialEffectsEngine.cpp b/Core/src/Extrapolation/MaterialEffectsEngine.cpp index 8ddd1cbb4..024d3ec61 100644 --- a/Core/src/Extrapolation/MaterialEffectsEngine.cpp +++ b/Core/src/Extrapolation/MaterialEffectsEngine.cpp @@ -54,10 +54,10 @@ Acts::MaterialEffectsEngine::setLogger(std::unique_ptr<const Logger> newLogger) // neutral extrapolation - just collect material / Acts::ExtrapolationCode Acts::MaterialEffectsEngine::handleMaterial( - ExCellNeutral& eCell, - const Surface* surface, - PropDirection dir, - MaterialUpdateStage matupstage) const + ExCellNeutral& eCell, + const Surface* surface, + PropDirection /*dir*/, + MaterialUpdateStage /*matupstage*/) const { // parameters are the lead parameters // by definition the material surface is the one the parametrs are on @@ -144,12 +144,12 @@ Acts::MaterialEffectsEngine::handleMaterial( // update method for charged extrapolation void Acts::MaterialEffectsEngine::updateTrackParameters( - ExCellCharged& eCell, - const Surface& mSurface, - PropDirection dir, - MaterialUpdateStage matupstage, - const std::string& surfaceType, - size_t surfaceID) const + ExCellCharged& eCell, + const Surface& mSurface, + PropDirection dir, + MaterialUpdateStage /*matupstage*/, + const std::string& surfaceType, + size_t surfaceID) const { // return if you have nothing to do if (!mSurface.associatedMaterial()) return; diff --git a/Core/src/Extrapolation/RungeKuttaUtils.cpp b/Core/src/Extrapolation/RungeKuttaUtils.cpp index aad4c63e3..226f69cf2 100644 --- a/Core/src/Extrapolation/RungeKuttaUtils.cpp +++ b/Core/src/Extrapolation/RungeKuttaUtils.cpp @@ -706,7 +706,7 @@ double Acts::RungeKuttaUtils::stepEstimatorToStraw(double* S, const double* P, bool& Q, - bool istep) const + bool /*istep*/) const { const double* r = &P[0]; // Start coordinate const double* a = &P[3]; // Start direction diff --git a/Core/src/Surfaces/ConeSurface.cpp b/Core/src/Surfaces/ConeSurface.cpp index 96858a9ed..2ba3e2e6f 100644 --- a/Core/src/Surfaces/ConeSurface.cpp +++ b/Core/src/Surfaces/ConeSurface.cpp @@ -21,20 +21,21 @@ #include "ACTS/Utilities/detail/RealQuadraticEquation.hpp" Acts::ConeSurface::ConeSurface(const ConeSurface& other) - : Surface(other), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other), m_bounds(other.m_bounds) { } Acts::ConeSurface::ConeSurface(const ConeSurface& other, const Transform3D& transf) - : Surface(other, transf), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other, transf), m_bounds(other.m_bounds) { } Acts::ConeSurface::ConeSurface(std::shared_ptr<const Transform3D> htrans, double alpha, bool symmetric) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const ConeBounds>(alpha, symmetric)) { } @@ -44,14 +45,15 @@ Acts::ConeSurface::ConeSurface(std::shared_ptr<const Transform3D> htrans, double zmin, double zmax, double halfPhi) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const ConeBounds>(alpha, zmin, zmax, halfPhi)) { } Acts::ConeSurface::ConeSurface(std::shared_ptr<const Transform3D> htrans, std::shared_ptr<const ConeBounds> cbounds) - : Surface(htrans), m_bounds(cbounds) + : GeometryObject(), Surface(htrans), m_bounds(cbounds) { throw_assert(cbounds, "ConeBounds must not be nullptr"); } diff --git a/Core/src/Surfaces/CylinderSurface.cpp b/Core/src/Surfaces/CylinderSurface.cpp index ab502c3e4..1a394a5ed 100644 --- a/Core/src/Surfaces/CylinderSurface.cpp +++ b/Core/src/Surfaces/CylinderSurface.cpp @@ -21,13 +21,13 @@ #include "ACTS/Utilities/detail/RealQuadraticEquation.hpp" Acts::CylinderSurface::CylinderSurface(const CylinderSurface& other) - : Surface(other), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other), m_bounds(other.m_bounds) { } Acts::CylinderSurface::CylinderSurface(const CylinderSurface& other, const Transform3D& transf) - : Surface(other, transf), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other, transf), m_bounds(other.m_bounds) { } @@ -35,7 +35,8 @@ Acts::CylinderSurface::CylinderSurface( std::shared_ptr<const Transform3D> htrans, double radius, double hlength) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const CylinderBounds>(radius, hlength)) { } @@ -45,7 +46,8 @@ Acts::CylinderSurface::CylinderSurface( double radius, double hphi, double hlength) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const CylinderBounds>(radius, hphi, hlength)) { } diff --git a/Core/src/Surfaces/DiscSurface.cpp b/Core/src/Surfaces/DiscSurface.cpp index 0dc1a097a..30c1b07a3 100644 --- a/Core/src/Surfaces/DiscSurface.cpp +++ b/Core/src/Surfaces/DiscSurface.cpp @@ -23,13 +23,13 @@ #include "ACTS/Utilities/ThrowAssert.hpp" Acts::DiscSurface::DiscSurface(const DiscSurface& other) - : Surface(other), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other), m_bounds(other.m_bounds) { } Acts::DiscSurface::DiscSurface(const DiscSurface& other, const Transform3D& transf) - : Surface(other, transf), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other, transf), m_bounds(other.m_bounds) { } @@ -37,7 +37,8 @@ Acts::DiscSurface::DiscSurface(std::shared_ptr<const Transform3D> htrans, double rmin, double rmax, double hphisec) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const RadialBounds>(rmin, rmax, hphisec)) { } @@ -49,7 +50,8 @@ Acts::DiscSurface::DiscSurface(std::shared_ptr<const Transform3D> htrans, double minR, double avephi, double stereo) - : Surface(htrans) + : GeometryObject() + , Surface(htrans) , m_bounds(std::make_shared<const DiscTrapezoidalBounds>(minhalfx, maxhalfx, maxR, @@ -61,14 +63,14 @@ Acts::DiscSurface::DiscSurface(std::shared_ptr<const Transform3D> htrans, Acts::DiscSurface::DiscSurface(std::shared_ptr<const Transform3D> htrans, std::shared_ptr<const DiscBounds> dbounds) - : Surface(htrans), m_bounds(dbounds) + : GeometryObject(), Surface(htrans), m_bounds(dbounds) { } Acts::DiscSurface::DiscSurface(std::shared_ptr<const DiscBounds> dbounds, const DetectorElementBase& detelement, const Identifier& identifier) - : Surface(detelement, identifier), m_bounds(nullptr) + : GeometryObject(), Surface(detelement, identifier), m_bounds(nullptr) { throw_assert(dbounds, "nullptr as DiscBounds"); } diff --git a/Core/src/Surfaces/LineSurface.cpp b/Core/src/Surfaces/LineSurface.cpp index 6dd3f7898..55675e1fa 100644 --- a/Core/src/Surfaces/LineSurface.cpp +++ b/Core/src/Surfaces/LineSurface.cpp @@ -21,32 +21,34 @@ Acts::LineSurface::LineSurface(std::shared_ptr<const Transform3D> htrans, double radius, double halez) - : Surface(htrans), m_bounds(std::make_shared<const LineBounds>(radius, halez)) + : GeometryObject() + , Surface(htrans) + , m_bounds(std::make_shared<const LineBounds>(radius, halez)) { } Acts::LineSurface::LineSurface(std::shared_ptr<const Transform3D> htrans, std::shared_ptr<const LineBounds> lbounds) - : Surface(htrans), m_bounds(lbounds) + : GeometryObject(), Surface(htrans), m_bounds(lbounds) { } Acts::LineSurface::LineSurface(std::shared_ptr<const LineBounds> lbounds, const DetectorElementBase& detelement, const Identifier& id) - : Surface(detelement, id), m_bounds(lbounds) + : GeometryObject(), Surface(detelement, id), m_bounds(lbounds) { throw_assert(lbounds, "LineBounds must not be nullptr"); } Acts::LineSurface::LineSurface(const LineSurface& other) - : Surface(other), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other), m_bounds(other.m_bounds) { } Acts::LineSurface::LineSurface(const LineSurface& other, const Transform3D& transf) - : Surface(other, transf), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other, transf), m_bounds(other.m_bounds) { } @@ -172,13 +174,13 @@ Acts::LineSurface::pathCorrection(const Acts::Vector3D&, } const Acts::Vector3D -Acts::LineSurface::binningPosition(Acts::BinningValue bValue) const + Acts::LineSurface::binningPosition(Acts::BinningValue /*bValue*/) const { return center(); } const Acts::Vector3D -Acts::LineSurface::normal(const Acts::Vector2D& lpos) const +Acts::LineSurface::normal(const Acts::Vector2D& /*lpos*/) const { // the normal is conceptionally closest to the line direction return lineDirection(); diff --git a/Core/src/Surfaces/PerigeeSurface.cpp b/Core/src/Surfaces/PerigeeSurface.cpp index 86c62e609..8abe20be3 100644 --- a/Core/src/Surfaces/PerigeeSurface.cpp +++ b/Core/src/Surfaces/PerigeeSurface.cpp @@ -23,18 +23,18 @@ Acts::PerigeeSurface::PerigeeSurface(const Vector3D& gp) : LineSurface(nullptr) Acts::PerigeeSurface::PerigeeSurface( std::shared_ptr<const Transform3D> tTransform) - : LineSurface(tTransform) + : GeometryObject(), LineSurface(tTransform) { } Acts::PerigeeSurface::PerigeeSurface(const PerigeeSurface& other) - : LineSurface(other) + : GeometryObject(), LineSurface(other) { } Acts::PerigeeSurface::PerigeeSurface(const PerigeeSurface& other, const Transform3D& shift) - : LineSurface(other, shift) + : GeometryObject(), LineSurface(other, shift) { } diff --git a/Core/src/Surfaces/PlaneSurface.cpp b/Core/src/Surfaces/PlaneSurface.cpp index 1f89f90e0..e6a5ab414 100644 --- a/Core/src/Surfaces/PlaneSurface.cpp +++ b/Core/src/Surfaces/PlaneSurface.cpp @@ -22,13 +22,13 @@ #include "ACTS/Utilities/ThrowAssert.hpp" Acts::PlaneSurface::PlaneSurface(const PlaneSurface& other) - : Surface(other), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other), m_bounds(other.m_bounds) { } Acts::PlaneSurface::PlaneSurface(const PlaneSurface& other, const Transform3D& transf) - : Surface(other, transf), m_bounds(other.m_bounds) + : GeometryObject(), Surface(other, transf), m_bounds(other.m_bounds) { } diff --git a/Core/src/Surfaces/StrawSurface.cpp b/Core/src/Surfaces/StrawSurface.cpp index b5dfaea36..9c5b60313 100644 --- a/Core/src/Surfaces/StrawSurface.cpp +++ b/Core/src/Surfaces/StrawSurface.cpp @@ -21,25 +21,25 @@ Acts::StrawSurface::StrawSurface(std::shared_ptr<const Transform3D> htrans, double radius, double halez) - : LineSurface(htrans, radius, halez) + : GeometryObject(), LineSurface(htrans, radius, halez) { } Acts::StrawSurface::StrawSurface(std::shared_ptr<const Transform3D> htrans, std::shared_ptr<const LineBounds> lbounds) - : LineSurface(htrans, lbounds) + : GeometryObject(), LineSurface(htrans, lbounds) { } Acts::StrawSurface::StrawSurface(std::shared_ptr<const LineBounds> lbounds, const DetectorElementBase& detelement, const Identifier& id) - : LineSurface(lbounds, detelement, id) + : GeometryObject(), LineSurface(lbounds, detelement, id) { } Acts::StrawSurface::StrawSurface(const Acts::StrawSurface& other) - : LineSurface(other) + : GeometryObject(), LineSurface(other) { } diff --git a/Core/src/Tools/SurfaceArrayCreator.cpp b/Core/src/Tools/SurfaceArrayCreator.cpp index d2e1a7d54..a0fe3558d 100644 --- a/Core/src/Tools/SurfaceArrayCreator.cpp +++ b/Core/src/Tools/SurfaceArrayCreator.cpp @@ -306,7 +306,7 @@ Acts::BinUtility Acts::SurfaceArrayCreator::createArbitraryBinUtility( const std::vector<const Surface*>& surfaces, Acts::BinningValue bValue, - std::shared_ptr<const Transform3D> transform) const + std::shared_ptr<const Transform3D> /*transform*/) const { if (!surfaces.size()) throw std::logic_error( @@ -573,7 +573,7 @@ Acts::BinUtility Acts::SurfaceArrayCreator::createEquidistantBinUtility( const std::vector<const Surface*>& surfaces, BinningValue bValue, - std::shared_ptr<const Transform3D> transform) const + std::shared_ptr<const Transform3D> /*transform*/) const { if (!surfaces.size()) throw std::logic_error( @@ -755,7 +755,7 @@ Acts::BinUtility Acts::SurfaceArrayCreator::createBinUtility( const std::vector<const Surface*>& surfaces, BinningValue bValue, - BinningType bType, + BinningType /*bType*/, size_t bins, double min, double max, @@ -831,7 +831,7 @@ Acts::SurfaceArrayCreator::registerNeighbourHood(SurfaceArray& sArray) const /// @todo implement nearest neighbour search - this is brute force attack /// - takes too long otherwise in initialization void -Acts::SurfaceArrayCreator::completeBinning(const BinUtility& binUtility, +Acts::SurfaceArrayCreator::completeBinning(const BinUtility& /*binUtility*/, const V3Matrix& v3Matrix, const SurfaceVector& sVector, SurfaceGrid& sGrid) const diff --git a/Core/src/Utilities/BFieldMapUtils.cpp b/Core/src/Utilities/BFieldMapUtils.cpp index 36c6e4ee9..4384ec4d6 100644 --- a/Core/src/Utilities/BFieldMapUtils.cpp +++ b/Core/src/Utilities/BFieldMapUtils.cpp @@ -198,7 +198,7 @@ Acts::InterpolatedBFieldMap::FieldMapper<3, 3> Acts::fieldMapperXYZ( // [4] Create the transformation for the bfield // map (Bx,By,Bz) -> (Bx,By,Bz) auto transformBField = [](const Acts::Vector3D& field, - const Acts::Vector3D& pos) { return field; }; + const Acts::Vector3D& /*pos*/) { return field; }; // [5] Create the mapper & BField Service // create field mapping diff --git a/IntegrationTests/PropagationTestBase.hpp b/IntegrationTests/PropagationTestBase.hpp index 5e485cbdf..68963b95a 100644 --- a/IntegrationTests/PropagationTestBase.hpp +++ b/IntegrationTests/PropagationTestBase.hpp @@ -89,6 +89,7 @@ BOOST_DATA_TEST_CASE( rand3, index) { + (void)index; double dcharge = -1 + 2 * charge; // just make sure we can reach it @@ -149,6 +150,7 @@ BOOST_DATA_TEST_CASE( rand3, index) { + (void)index; double dcharge = -1 + 2 * charge; // to a plane with the atlas stepper auto a_at_plane @@ -227,6 +229,7 @@ BOOST_DATA_TEST_CASE( rand3, index) { + (void)index; double dcharge = -1 + 2 * charge; // to a disc with the atlas stepper auto a_at_disc @@ -305,6 +308,7 @@ BOOST_DATA_TEST_CASE( rand3, index) { + (void)index; double dcharge = -1 + 2 * charge; // to a line with the atlas stepper auto a_at_line diff --git a/IntegrationTests/PropagationTestHelper.hpp b/IntegrationTests/PropagationTestHelper.hpp index 9627a0018..ea8bdbe7a 100644 --- a/IntegrationTests/PropagationTestHelper.hpp +++ b/IntegrationTests/PropagationTestHelper.hpp @@ -80,9 +80,9 @@ namespace IntegrationTest { double phi, double theta, double charge, - int index, - double Bz, - double disttol = 0.1 * units::_um) + int /*index*/, + double Bz, + double disttol = 0.1 * units::_um) { // setup propagation options @@ -163,9 +163,9 @@ namespace IntegrationTest { double theta, double charge, double plimit, - int index, - double disttol = 1. * units::_um, - double momtol = 10. * units::_keV) + int /*index*/, + double disttol = 1. * units::_um, + double momtol = 10. * units::_keV) { // setup propagation options @@ -216,7 +216,7 @@ namespace IntegrationTest { double plimit, double rand1, double rand2, - double rand3) + double /*rand3*/) { // setup propagation options typename Propagator_type::template Options<> options; @@ -319,8 +319,8 @@ namespace IntegrationTest { double theta, double charge, double plimit, - int index, - double reltol = 1e-4) + int /*index*/, + double reltol = 1e-4) { covariance_validation_fixture<Propagator_type> fixture(propagator); // setup propagation options @@ -379,10 +379,10 @@ namespace IntegrationTest { double rand1, double rand2, double rand3, - int index, - bool startPlanar = true, - bool destPlanar = true, - double reltol = 1e-3) + int /*index*/, + bool startPlanar = true, + bool destPlanar = true, + double reltol = 1e-3) { covariance_validation_fixture<Propagator_type> fixture(propagator); diff --git a/Plugins/DD4hepPlugin/src/ConvertDD4hepDetector.cpp b/Plugins/DD4hepPlugin/src/ConvertDD4hepDetector.cpp index 2ca2f44e1..e9ad4d151 100644 --- a/Plugins/DD4hepPlugin/src/ConvertDD4hepDetector.cpp +++ b/Plugins/DD4hepPlugin/src/ConvertDD4hepDetector.cpp @@ -33,8 +33,6 @@ convertDD4hepDetector(dd4hep::DetElement worldDetElement, bool buildDigitizationModules) { // check if envelopes of the volume should be built automatically - bool buildEnvelopes = false; - if (layerEnvelopeR && layerEnvelopeZ) buildEnvelopes = true; // create local logger for conversion auto DD4hepConverterlogger = Acts::getDefaultLogger("DD4hepConversion", loggingLevel); diff --git a/Tests/EventData/BoundParametersTests.cpp b/Tests/EventData/BoundParametersTests.cpp index 43a0e5b61..eb000bc54 100644 --- a/Tests/EventData/BoundParametersTests.cpp +++ b/Tests/EventData/BoundParametersTests.cpp @@ -64,6 +64,7 @@ namespace Test { c, index) { + (void)index; Vector3D center{x, y, z}; auto transform = std::make_shared<Transform3D>(); transform->setIdentity(); @@ -169,6 +170,7 @@ namespace Test { c, index) { + (void)index; Vector3D center{x, y, z}; auto transform = std::make_shared<Transform3D>(); transform->setIdentity(); @@ -250,6 +252,7 @@ namespace Test { c, index) { + (void)index; Vector3D center{x, y, z}; auto transform = std::make_shared<Transform3D>(); @@ -341,6 +344,7 @@ namespace Test { b, index) { + (void)index; Vector3D center{x, y, z}; auto transform = std::make_shared<Transform3D>(); transform->setIdentity(); @@ -409,6 +413,7 @@ namespace Test { c, index) { + (void)index; Vector3D center{x, y, z}; auto transform = std::make_shared<Transform3D>(); diff --git a/Tests/Layers/ConeLayerTests.cpp b/Tests/Layers/ConeLayerTests.cpp index e9170b35f..fabb7a30f 100644 --- a/Tests/Layers/ConeLayerTests.cpp +++ b/Tests/Layers/ConeLayerTests.cpp @@ -34,7 +34,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant ConeLayer object BOOST_AUTO_TEST_CASE(ConeLayerConstruction) @@ -109,7 +109,7 @@ namespace Test { == std::string("Acts::ConeSurface")); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/CylinderLayerTests.cpp b/Tests/Layers/CylinderLayerTests.cpp index 4559d86f8..7d7cc9241 100644 --- a/Tests/Layers/CylinderLayerTests.cpp +++ b/Tests/Layers/CylinderLayerTests.cpp @@ -34,7 +34,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant CylinderLayer object BOOST_AUTO_TEST_CASE(CylinderLayerConstruction) @@ -101,7 +101,7 @@ namespace Test { == std::string("Acts::CylinderSurface")); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/DiscLayerTests.cpp b/Tests/Layers/DiscLayerTests.cpp index 8d9dd5c96..3fb557193 100644 --- a/Tests/Layers/DiscLayerTests.cpp +++ b/Tests/Layers/DiscLayerTests.cpp @@ -34,7 +34,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant DiscLayer object BOOST_AUTO_TEST_CASE(DiscLayerConstruction) @@ -98,7 +98,7 @@ namespace Test { == std::string("Acts::DiscSurface")); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/GenericApproachDescriptorTests.cpp b/Tests/Layers/GenericApproachDescriptorTests.cpp index 5402eee7c..acf0cfc07 100644 --- a/Tests/Layers/GenericApproachDescriptorTests.cpp +++ b/Tests/Layers/GenericApproachDescriptorTests.cpp @@ -29,7 +29,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant GenericApproachDescriptor /// object @@ -76,7 +76,7 @@ namespace Test { BOOST_CHECK(&(approachDescriptor.containedSurfaces()) == &someSurfaces); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/LayerTests.cpp b/Tests/Layers/LayerTests.cpp index 6972e5e08..ac93613db 100644 --- a/Tests/Layers/LayerTests.cpp +++ b/Tests/Layers/LayerTests.cpp @@ -33,7 +33,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant Layer object BOOST_AUTO_TEST_CASE(LayerConstruction) @@ -141,7 +141,7 @@ namespace Test { BOOST_TEST(layerStub.detectorElements().size() == 0u); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/NavigationLayerTests.cpp b/Tests/Layers/NavigationLayerTests.cpp index 39980837d..f7b2e5e91 100644 --- a/Tests/Layers/NavigationLayerTests.cpp +++ b/Tests/Layers/NavigationLayerTests.cpp @@ -31,7 +31,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant NavigationLayer object BOOST_AUTO_TEST_CASE(NavigationLayerConstruction) @@ -71,7 +71,7 @@ namespace Test { BOOST_CHECK(pNavigationLayer->resolve(true, true, true) == false); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/Layers/PlaneLayerTests.cpp b/Tests/Layers/PlaneLayerTests.cpp index fd625da48..237407d32 100644 --- a/Tests/Layers/PlaneLayerTests.cpp +++ b/Tests/Layers/PlaneLayerTests.cpp @@ -34,7 +34,7 @@ namespace Acts { namespace Test { namespace Layers { - BOOST_AUTO_TEST_SUITE(Layers); + BOOST_AUTO_TEST_SUITE(Layers) /// Unit test for creating compliant/non-compliant PlaneLayer object BOOST_AUTO_TEST_CASE(PlaneLayerConstruction) @@ -99,7 +99,7 @@ namespace Test { == std::string("Acts::PlaneSurface")); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Layers } // end of namespace Test diff --git a/Tests/MagneticField/ConstantBFieldTests.cpp b/Tests/MagneticField/ConstantBFieldTests.cpp index 362691678..41609ee82 100644 --- a/Tests/MagneticField/ConstantBFieldTests.cpp +++ b/Tests/MagneticField/ConstantBFieldTests.cpp @@ -47,6 +47,7 @@ namespace Test { bz, index) { + (void)index; BOOST_TEST_CONTEXT("Eigen interface") { const Vector3D Btrue(bx, by, bz); @@ -93,6 +94,7 @@ namespace Test { bz, index) { + (void)index; ConstantBField BField(0, 0, 0); BOOST_TEST_CONTEXT("Eigen interface") diff --git a/Tests/Propagator/RungeKuttaEngineTests.cpp b/Tests/Propagator/RungeKuttaEngineTests.cpp index 1f3451a28..74e6c11a0 100644 --- a/Tests/Propagator/RungeKuttaEngineTests.cpp +++ b/Tests/Propagator/RungeKuttaEngineTests.cpp @@ -37,7 +37,7 @@ namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(RungeKuttaEngine); + BOOST_AUTO_TEST_SUITE(RungeKuttaEngine) /// This tests does a propagation through /// a magnetic field with 2 Tesla - at nominal incidence @@ -188,7 +188,7 @@ namespace Test { BOOST_TEST_MESSAGE("Propagations failed !"); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test } // end of namespace Acts diff --git a/Tests/Surfaces/BoundaryCheckBenchmark.cpp b/Tests/Surfaces/BoundaryCheckBenchmark.cpp index 651bcfae1..99b39c667 100644 --- a/Tests/Surfaces/BoundaryCheckBenchmark.cpp +++ b/Tests/Surfaces/BoundaryCheckBenchmark.cpp @@ -92,7 +92,7 @@ struct StopWatch }; int -main(int argc, char* argv[]) +main(int /*argc*/, char** /*argv[]*/) { using std::cout; diff --git a/Tests/Surfaces/BoundaryCheckTests.cpp b/Tests/Surfaces/BoundaryCheckTests.cpp index 59b4d3bda..6d8f6ede9 100644 --- a/Tests/Surfaces/BoundaryCheckTests.cpp +++ b/Tests/Surfaces/BoundaryCheckTests.cpp @@ -23,7 +23,7 @@ namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) // See: https://en.wikipedia.org/wiki/Bounding_volume // // Aligned box w/ simple check @@ -81,6 +81,6 @@ namespace Test { BOOST_TEST(check.isInside({0, 4}, vertices) == true); BOOST_TEST(check.isInside({0, 5}, vertices) == false); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test } // end of namespace Acts diff --git a/Tests/Surfaces/ConeBoundsTests.cpp b/Tests/Surfaces/ConeBoundsTests.cpp index 5bb74ab32..881e665ba 100644 --- a/Tests/Surfaces/ConeBoundsTests.cpp +++ b/Tests/Surfaces/ConeBoundsTests.cpp @@ -36,7 +36,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant ConeBounds object BOOST_AUTO_TEST_CASE(ConeBoundsConstruction) { @@ -126,7 +126,7 @@ namespace Test { assignedConeBounds = originalConeBounds; BOOST_TEST(assignedConeBounds == originalConeBounds); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/ConeSurfaceTests.cpp b/Tests/Surfaces/ConeSurfaceTests.cpp index 9ab124c93..4c4c235b1 100644 --- a/Tests/Surfaces/ConeSurfaceTests.cpp +++ b/Tests/Surfaces/ConeSurfaceTests.cpp @@ -31,7 +31,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(ConeSurfaces); + BOOST_AUTO_TEST_SUITE(ConeSurfaces) /// Unit test for creating compliant/non-compliant ConeSurface object BOOST_AUTO_TEST_CASE(ConeSurfaceConstruction) { @@ -204,7 +204,7 @@ namespace Test { /// Test equality of assigned to original BOOST_TEST(assignedConeSurface == coneSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/CylinderBoundsTests.cpp b/Tests/Surfaces/CylinderBoundsTests.cpp index 2a15ce7dd..584337e98 100644 --- a/Tests/Surfaces/CylinderBoundsTests.cpp +++ b/Tests/Surfaces/CylinderBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant CylinderBounds object BOOST_AUTO_TEST_CASE(CylinderBoundsConstruction) { @@ -49,7 +49,7 @@ namespace Test { } /// Unit tests for CylinderBounds properties - BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 4); + BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 4) BOOST_AUTO_TEST_CASE(CylinderBoundsProperties) { // CylinderBounds object of radius 0.5 and halfz 20 @@ -132,7 +132,7 @@ namespace Test { BOOST_TEST(assignedCylinderBounds.r() == cylinderBoundsObject.r()); BOOST_TEST(assignedCylinderBounds == cylinderBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/CylinderSurfaceTests.cpp b/Tests/Surfaces/CylinderSurfaceTests.cpp index 86391bae3..3577e1c65 100644 --- a/Tests/Surfaces/CylinderSurfaceTests.cpp +++ b/Tests/Surfaces/CylinderSurfaceTests.cpp @@ -22,6 +22,7 @@ #include "ACTS/Surfaces/CylinderSurface.hpp" #include "ACTS/Surfaces/RectangleBounds.hpp" #include "ACTS/Utilities/Definitions.hpp" +#include "DetectorElementStub.hpp" namespace tt = boost::test_tools; using boost::test_tools::output_test_stream; @@ -31,7 +32,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(CylinderSurfaces); + BOOST_AUTO_TEST_SUITE(CylinderSurfaces) /// Unit test for creating compliant/non-compliant CylinderSurface object BOOST_AUTO_TEST_CASE(CylinderSurfaceConstruction) { @@ -209,7 +210,7 @@ namespace Test { /// Test equality of assigned to original BOOST_TEST(assignedCylinderSurface == cylinderSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/DiamondBoundsTests.cpp b/Tests/Surfaces/DiamondBoundsTests.cpp index b0b2fb3c3..0899dbf42 100644 --- a/Tests/Surfaces/DiamondBoundsTests.cpp +++ b/Tests/Surfaces/DiamondBoundsTests.cpp @@ -20,13 +20,14 @@ // #include "ACTS/Surfaces/DiamondBounds.hpp" #include "ACTS/Utilities/Definitions.hpp" +#include "ACTS/Utilities/ThrowAssert.hpp" // #include <limits> namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant DiamondBounds object BOOST_AUTO_TEST_CASE(DiamondBoundsConstruction) { @@ -143,7 +144,7 @@ namespace Test { assignedDiamondBoundsObject = diamondBoundsObject; BOOST_TEST(assignedDiamondBoundsObject == diamondBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/DiscSurfaceTests.cpp b/Tests/Surfaces/DiscSurfaceTests.cpp index d239397d4..e5822d81e 100644 --- a/Tests/Surfaces/DiscSurfaceTests.cpp +++ b/Tests/Surfaces/DiscSurfaceTests.cpp @@ -35,7 +35,7 @@ namespace Acts { namespace Test { // using boost::test_tools::output_test_stream; - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit tests for creating DiscSurface object BOOST_AUTO_TEST_CASE(DiscSurface_constructors_test) { @@ -205,7 +205,7 @@ namespace Test { BOOST_CHECK_NO_THROW(assignedDisc = discSurfaceObject); BOOST_CHECK(assignedDisc == discSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/DiscTrapezoidalBoundsTests.cpp b/Tests/Surfaces/DiscTrapezoidalBoundsTests.cpp index 93ead6b25..8601cd972 100644 --- a/Tests/Surfaces/DiscTrapezoidalBoundsTests.cpp +++ b/Tests/Surfaces/DiscTrapezoidalBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit tests for DiscTrapezoidalBounds constrcuctors BOOST_AUTO_TEST_CASE(DiscTrapezoidalBoundsConstruction) { @@ -135,7 +135,7 @@ namespace Test { BOOST_TEST(assignedDiscTrapezoidalBoundsObject == discTrapezoidalBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/EllipseBoundsTests.cpp b/Tests/Surfaces/EllipseBoundsTests.cpp index 8a0d6b148..ee2a1e89a 100644 --- a/Tests/Surfaces/EllipseBoundsTests.cpp +++ b/Tests/Surfaces/EllipseBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant EllipseBounds object BOOST_AUTO_TEST_CASE(EllipseBoundsConstruction) { @@ -51,7 +51,7 @@ namespace Test { } /// Unit tests for EllipseBounds properties - BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 1); + BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CylinderBoundsProperties, 1) BOOST_AUTO_TEST_CASE(EllipseBoundsProperties) { double minRad1(10.), minRad2(15.), maxRad1(15.), maxRad2(20.), @@ -137,7 +137,7 @@ namespace Test { assignedEllipseBoundsObject = ellipseBoundsObject; BOOST_TEST(assignedEllipseBoundsObject == ellipseBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/InfiniteBoundsTests.cpp b/Tests/Surfaces/InfiniteBoundsTests.cpp index 3d33dec59..aa996539d 100644 --- a/Tests/Surfaces/InfiniteBoundsTests.cpp +++ b/Tests/Surfaces/InfiniteBoundsTests.cpp @@ -24,7 +24,7 @@ namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant InfiniteBounds object BOOST_AUTO_TEST_CASE(InfiniteBoundsConstruction) { @@ -66,7 +66,7 @@ namespace Test { dumpOuput.is_equal("Acts::InfiniteBounds ... boundless surface\n")); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/LineBoundsTests.cpp b/Tests/Surfaces/LineBoundsTests.cpp index 356f61344..98ce96281 100644 --- a/Tests/Surfaces/LineBoundsTests.cpp +++ b/Tests/Surfaces/LineBoundsTests.cpp @@ -24,7 +24,7 @@ namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant LineBounds object BOOST_AUTO_TEST_CASE(LineBoundsConstruction) { @@ -45,7 +45,7 @@ namespace Test { } /// Unit tests for LineBounds properties - BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(LineBoundsProperties, 1); + BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(LineBoundsProperties, 1) BOOST_AUTO_TEST_CASE(LineBoundsProperties) { // LineBounds object of radius 0.5 and halfz 20 @@ -98,7 +98,7 @@ namespace Test { BOOST_TEST(assignedLineBounds.halflengthZ() == lineBoundsObject.halflengthZ()); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/LineSurfaceStub.hpp b/Tests/Surfaces/LineSurfaceStub.hpp index 4731e7528..800a435c5 100644 --- a/Tests/Surfaces/LineSurfaceStub.hpp +++ b/Tests/Surfaces/LineSurfaceStub.hpp @@ -24,32 +24,34 @@ public: LineSurfaceStub(std::shared_ptr<const Transform3D> htrans, double radius, double halfz) - : LineSurface(htrans, radius, halfz) + : GeometryObject(), LineSurface(htrans, radius, halfz) { /* nop */ } // LineSurfaceStub(std::shared_ptr<const Transform3D> htrans, std::shared_ptr<const LineBounds> lbounds = nullptr) - : LineSurface(htrans, lbounds) + : GeometryObject(), LineSurface(htrans, lbounds) { /*nop */ } // LineSurfaceStub(std::shared_ptr<const LineBounds> lbounds, const DetectorElementBase& detelement, const Identifier& identifier = Identifier()) - : LineSurface(lbounds, detelement, identifier) + : GeometryObject(), LineSurface(lbounds, detelement, identifier) { /* nop */ } // - LineSurfaceStub(const LineSurfaceStub& ls) : LineSurface(ls) { /* nop */} + LineSurfaceStub(const LineSurfaceStub& ls) : GeometryObject(), LineSurface(ls) + { /* nop */ + } // LineSurfaceStub(const LineSurfaceStub& ls, const Transform3D& t) - : LineSurface(ls, t) + : GeometryObject(), LineSurface(ls, t) { /* nop */ } /// pure virtual functions of baseclass implemented here Surface* - clone(const Transform3D* shift = nullptr) const final + clone(const Transform3D* /*shift = nullptr*/) const final { return nullptr; } diff --git a/Tests/Surfaces/LineSurfaceTests.cpp b/Tests/Surfaces/LineSurfaceTests.cpp index eeb5a3acc..2ca835df0 100644 --- a/Tests/Surfaces/LineSurfaceTests.cpp +++ b/Tests/Surfaces/LineSurfaceTests.cpp @@ -34,7 +34,7 @@ namespace Acts { namespace Test { // using boost::test_tools::output_test_stream; - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant LineSurface object BOOST_AUTO_TEST_CASE(LineSurface_Constructors_test) { @@ -174,7 +174,7 @@ namespace Test { "LineSurfaces are equal value after assignment"); // operator == // from base } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/PerigeeSurfaceTests.cpp b/Tests/Surfaces/PerigeeSurfaceTests.cpp index 8a87ac474..3e02b2cd9 100644 --- a/Tests/Surfaces/PerigeeSurfaceTests.cpp +++ b/Tests/Surfaces/PerigeeSurfaceTests.cpp @@ -33,7 +33,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(PerigeeSurfaces); + BOOST_AUTO_TEST_SUITE(PerigeeSurfaces) /// Unit test for creating compliant/non-compliant PerigeeSurface object BOOST_AUTO_TEST_CASE(PerigeeSurfaceConstruction) { @@ -100,7 +100,7 @@ namespace Test { /// Test equality of assigned to original BOOST_TEST(assignedPerigeeSurface == perigeeSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/PlaneSurfaceTests.cpp b/Tests/Surfaces/PlaneSurfaceTests.cpp index 95ea58f7c..e8a578b6a 100644 --- a/Tests/Surfaces/PlaneSurfaceTests.cpp +++ b/Tests/Surfaces/PlaneSurfaceTests.cpp @@ -21,6 +21,7 @@ #include "ACTS/Surfaces/PlaneSurface.hpp" #include "ACTS/Surfaces/RectangleBounds.hpp" #include "ACTS/Utilities/Definitions.hpp" +#include "DetectorElementStub.hpp" namespace tt = boost::test_tools; using boost::test_tools::output_test_stream; @@ -29,7 +30,7 @@ namespace utf = boost::unit_test; namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(PlaneSurfaces); + BOOST_AUTO_TEST_SUITE(PlaneSurfaces) /// Unit test for creating compliant/non-compliant PlaneSurface object BOOST_AUTO_TEST_CASE(PlaneSurfaceConstruction) { @@ -177,7 +178,7 @@ namespace Test { /// Test equality of assigned to original BOOST_TEST(assignedPlaneSurface == PlaneSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/RadialBoundsTests.cpp b/Tests/Surfaces/RadialBoundsTests.cpp index 9a87fea51..eacb83ce5 100644 --- a/Tests/Surfaces/RadialBoundsTests.cpp +++ b/Tests/Surfaces/RadialBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit tests for RadialBounds constrcuctors BOOST_AUTO_TEST_CASE(RadialBoundsConstruction) { @@ -109,7 +109,7 @@ namespace Test { assignedRadialBoundsObject = radialBoundsObject; BOOST_TEST(assignedRadialBoundsObject == radialBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/RectangleBoundsTests.cpp b/Tests/Surfaces/RectangleBoundsTests.cpp index 8261a8b57..eb2886a94 100644 --- a/Tests/Surfaces/RectangleBoundsTests.cpp +++ b/Tests/Surfaces/RectangleBoundsTests.cpp @@ -45,7 +45,7 @@ namespace Test { const double tol = 1e-9; return ((dif0 < tol) and (dif1 < tol)); } - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant RectangleBounds object BOOST_AUTO_TEST_CASE(RectangleBoundsConstruction) { @@ -121,7 +121,7 @@ namespace Test { BOOST_TEST(originalVertices == clonedVertices); delete rectB; } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test } // end of namespace Acts diff --git a/Tests/Surfaces/StrawSurfaceTests.cpp b/Tests/Surfaces/StrawSurfaceTests.cpp index e863db40e..fc9c2255e 100644 --- a/Tests/Surfaces/StrawSurfaceTests.cpp +++ b/Tests/Surfaces/StrawSurfaceTests.cpp @@ -32,7 +32,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(StrawSurfaces); + BOOST_AUTO_TEST_SUITE(StrawSurfaces) /// Unit test for creating compliant/non-compliant StrawSurface object BOOST_AUTO_TEST_CASE(StrawSurfaceConstruction) { @@ -122,7 +122,7 @@ namespace Test { /// Test equality of assigned to original BOOST_TEST(assignedStrawSurface == strawSurfaceObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/SurfaceBoundsTests.cpp b/Tests/Surfaces/SurfaceBoundsTests.cpp index 2703bf355..e35e81fe2 100644 --- a/Tests/Surfaces/SurfaceBoundsTests.cpp +++ b/Tests/Surfaces/SurfaceBoundsTests.cpp @@ -51,12 +51,12 @@ public: return m_values; } bool - inside(const Vector2D& lpos, const BoundaryCheck& bcheck) const final + inside(const Vector2D& /*lpos*/, const BoundaryCheck& /*bcheck*/) const final { return true; } double - distanceToBoundary(const Vector2D& lpos) const final + distanceToBoundary(const Vector2D& /*lpos*/) const final { return 10.; } @@ -72,7 +72,7 @@ private: }; namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant SurfaceBounds object BOOST_AUTO_TEST_CASE(SurfaceBoundsConstruction) { @@ -100,7 +100,7 @@ namespace Test { BOOST_TEST(surface == assignedSurface); BOOST_TEST(surface.valueStore() == assignedSurface.valueStore()); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/SurfaceStub.hpp b/Tests/Surfaces/SurfaceStub.hpp index 638402fc4..00acaf038 100644 --- a/Tests/Surfaces/SurfaceStub.hpp +++ b/Tests/Surfaces/SurfaceStub.hpp @@ -19,16 +19,16 @@ class SurfaceStub : public Surface { public: SurfaceStub(std::shared_ptr<const Transform3D> htrans = nullptr) - : Surface(htrans) + : GeometryObject(), Surface(htrans) { } SurfaceStub(const SurfaceStub& sf, const Transform3D& transf) - : Surface(sf, transf) + : GeometryObject(), Surface(sf, transf) { } SurfaceStub(const DetectorElementBase& detelement, const Identifier& id = Identifier()) - : Surface(detelement, id) + : GeometryObject(), Surface(detelement, id) { } @@ -36,7 +36,7 @@ public: /// Implicit constructor Surface* - clone(const Transform3D* shift = nullptr) const final + clone(const Transform3D* /*shift = nullptr*/) const final { return nullptr; } @@ -50,7 +50,7 @@ public: /// Return method for the normal vector of the surface const Vector3D - normal(const Vector2D& lpos) const final + normal(const Vector2D& /*lpos*/) const final { return Vector3D{0., 0., 0.}; } @@ -64,18 +64,18 @@ public: /// Local to global transformation void - localToGlobal(const Vector2D& lpos, - const Vector3D& gmom, - Vector3D& gpos) const final + localToGlobal(const Vector2D& /*lpos*/, + const Vector3D& /*gmom*/, + Vector3D& /*gpos*/) const final { // nop } /// Global to local transformation bool - globalToLocal(const Vector3D& gpos, - const Vector3D& gmom, - Vector2D& lpos) const final + globalToLocal(const Vector3D& /*gpos*/, + const Vector3D& /*gmom*/, + Vector2D& lpos) const final { lpos = Vector2D{20., 20.}; return true; @@ -83,25 +83,24 @@ public: /// Calculation of the path correction for incident double - pathCorrection(const Vector3D& gpos, const Vector3D& gmom) const final + pathCorrection(const Vector3D& /*gpos*/, const Vector3D& /*gmom*/) const final { return 0.0; } /// Straight line intersection schema from parameters Intersection - intersectionEstimate(const Vector3D& gpos, - const Vector3D& gdir, - bool forceDir = false, - const BoundaryCheck& bcheck = false) const final + intersectionEstimate(const Vector3D& /*gpos*/, + const Vector3D& /*gdir*/, + bool /*forceDir = false*/, + const BoundaryCheck& /*bcheck = false*/) const final { const Intersection is{Vector3D{1, 1, 1}, 20., true}; return is; } /// Inherited from GeometryObject base - const Vector3D - binningPosition(BinningValue bValue) const final + const Vector3D binningPosition(BinningValue /*bValue*/) const final { const Vector3D v{0.0, 0.0, 0.0}; return v; diff --git a/Tests/Surfaces/SurfaceTests.cpp b/Tests/Surfaces/SurfaceTests.cpp index 73d3693b1..2f2376061 100644 --- a/Tests/Surfaces/SurfaceTests.cpp +++ b/Tests/Surfaces/SurfaceTests.cpp @@ -58,7 +58,7 @@ private: }; namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// todo: make test fixture; separate out different cases @@ -208,7 +208,7 @@ namespace Test { BOOST_TEST(unequalSurface, "Different transform surfaces should be unequal"); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/TrapezoidBoundsTests.cpp b/Tests/Surfaces/TrapezoidBoundsTests.cpp index 096c67c6d..7e86b59d0 100644 --- a/Tests/Surfaces/TrapezoidBoundsTests.cpp +++ b/Tests/Surfaces/TrapezoidBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant TrapezoidBounds object BOOST_AUTO_TEST_CASE(TrapezoidBoundsConstruction) { @@ -118,7 +118,7 @@ namespace Test { assignedTrapezoidBoundsObject = trapezoidBoundsObject; BOOST_TEST(assignedTrapezoidBoundsObject == trapezoidBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Surfaces/TriangleBoundsTests.cpp b/Tests/Surfaces/TriangleBoundsTests.cpp index 1729bee42..46343a1f4 100644 --- a/Tests/Surfaces/TriangleBoundsTests.cpp +++ b/Tests/Surfaces/TriangleBoundsTests.cpp @@ -28,7 +28,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating compliant/non-compliant TriangleBounds object BOOST_AUTO_TEST_CASE(TriangleBoundsConstruction) { @@ -112,7 +112,7 @@ namespace Test { assignedTriangleBoundsObject = triangleBoundsObject; BOOST_TEST(assignedTriangleBoundsObject == triangleBoundsObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Tools/CylinderVolumeBuilderTests.cpp b/Tests/Tools/CylinderVolumeBuilderTests.cpp index 641eb9461..90499f02b 100644 --- a/Tests/Tools/CylinderVolumeBuilderTests.cpp +++ b/Tests/Tools/CylinderVolumeBuilderTests.cpp @@ -36,6 +36,7 @@ namespace Test { length, index) { + (void)index; // inner volume VolumeConfig innerConfig; innerConfig.rMin = 0.; @@ -120,6 +121,7 @@ namespace Test { length, index) { + (void)index; // inner volume VolumeConfig innerConfig; innerConfig.rMin = 0.; @@ -207,6 +209,7 @@ namespace Test { outer, index) { + (void)index; // reference volume VolumeConfig Config0; Config0.rMin = 5.; @@ -273,6 +276,7 @@ namespace Test { inner, index) { + (void)index; // inner volume VolumeConfig Config0; Config0.rMin = 0.; diff --git a/Tests/Utilities/RealQuadraticEquationTests.cpp b/Tests/Utilities/RealQuadraticEquationTests.cpp index 549d44ef6..c6c910b07 100644 --- a/Tests/Utilities/RealQuadraticEquationTests.cpp +++ b/Tests/Utilities/RealQuadraticEquationTests.cpp @@ -32,7 +32,7 @@ const double NaN = std::numeric_limits<double>::quiet_NaN(); namespace Acts { namespace Test { - BOOST_AUTO_TEST_SUITE(Surfaces); + BOOST_AUTO_TEST_SUITE(Surfaces) /// Unit test for creating RealQuadraticEquation object BOOST_AUTO_TEST_CASE(RealQuadraticEquationConstruction) { @@ -79,7 +79,7 @@ namespace Test { // BOOST_TEST(assignedRealQuadraticEquationObject == // realQuadraticEquationObject); } - BOOST_AUTO_TEST_SUITE_END(); + BOOST_AUTO_TEST_SUITE_END() } // end of namespace Test diff --git a/Tests/Utilities/UnitConversionTests.cpp b/Tests/Utilities/UnitConversionTests.cpp index b05e5ef4c..8140176c5 100644 --- a/Tests/Utilities/UnitConversionTests.cpp +++ b/Tests/Utilities/UnitConversionTests.cpp @@ -15,7 +15,7 @@ using namespace Acts::units; namespace utf = boost::unit_test; namespace tt = boost::test_tools; -BOOST_AUTO_TEST_SUITE(unit_conversion, *utf::tolerance(1e-15)); +BOOST_AUTO_TEST_SUITE(unit_conversion, *utf::tolerance(1e-15)) BOOST_AUTO_TEST_CASE(length_conversions) { @@ -79,4 +79,4 @@ BOOST_AUTO_TEST_CASE(si_nat_conversions, *utf::tolerance(1e-8)) } // clang-format on -BOOST_AUTO_TEST_SUITE_END(); +BOOST_AUTO_TEST_SUITE_END() diff --git a/Tests/Volumes/CylinderVolumeBoundsTests.cpp b/Tests/Volumes/CylinderVolumeBoundsTests.cpp index 0ab4403af..7fe395ae8 100644 --- a/Tests/Volumes/CylinderVolumeBoundsTests.cpp +++ b/Tests/Volumes/CylinderVolumeBoundsTests.cpp @@ -37,6 +37,7 @@ namespace Test { posZ, index) { + (void)index; // position of volume const Vector3D pos(posX, posY, posZ); // rotation around x axis diff --git a/cmake/ACTSCompilerOptions.cmake b/cmake/ACTSCompilerOptions.cmake index 609e1c980..0978508a0 100644 --- a/cmake/ACTSCompilerOptions.cmake +++ b/cmake/ACTSCompilerOptions.cmake @@ -1,5 +1,5 @@ # set ACTS compiler flags -set (ACTS_CXX_FLAGS "-Wall") +set (ACTS_CXX_FLAGS "-Wall -Wextra -Wpedantic") set (ACTS_CXX_FLAGS_DEBUG "--coverage") set (ACTS_CXX_FLAGS_MINSIZEREL "") set (ACTS_CXX_FLAGS_RELEASE "") -- GitLab