From 4a4848a95df964636eb797b834933181ca94c47b Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 19 Nov 2020 12:08:19 +0100
Subject: [PATCH] Work on warnings from clang-11

---
 Base/Axis/ConstKBinAxis.h                     | 12 ++--
 Core/Computation/ConstantBackground.h         |  4 +-
 Core/Computation/PoissonNoiseBackground.h     |  4 +-
 Core/Simulation/DepthProbeSimulation.h        |  2 +-
 Core/Simulation/OffSpecSimulation.h           | 10 +--
 Core/Simulation/SpecularSimulation.h          |  2 +-
 Device/Detector/SimpleUnitConverters.h        | 64 +++++++++----------
 Fit/Adapter/MinimizerAdapter.h                |  8 +--
 GUI/coregui/Models/ParameterTranslators.h     | 48 +++++++-------
 .../Aggregate/InterferenceFunction1DLattice.h | 12 ++--
 .../Aggregate/InterferenceFunction2DLattice.h | 16 ++---
 .../InterferenceFunction2DParaCrystal.h       | 14 ++--
 .../InterferenceFunction2DSuperLattice.h      | 14 ++--
 .../Aggregate/InterferenceFunction3DLattice.h | 16 ++---
 .../InterferenceFunctionFinite2DLattice.h     | 10 +--
 .../InterferenceFunctionFinite3DLattice.h     | 10 +--
 .../Aggregate/InterferenceFunctionHardDisk.h  | 12 ++--
 Sample/Aggregate/InterferenceFunctionNone.h   |  6 +-
 .../InterferenceFunctionRadialParaCrystal.h   |  8 +--
 Sample/Aggregate/InterferenceFunctionTwin.h   |  6 +-
 Sample/Correlations/FTDistributions1D.h       | 60 ++++++++---------
 Sample/Fresnel/MatrixFresnelMap.h             |  4 +-
 Sample/HardParticle/FormFactorAnisoPyramid.h  |  8 +--
 Sample/HardParticle/FormFactorBox.h           | 14 ++--
 .../HardParticle/FormFactorCantellatedCube.h  |  6 +-
 Sample/HardParticle/FormFactorCone.h          | 12 ++--
 Sample/HardParticle/FormFactorCone6.h         |  8 +--
 Sample/HardParticle/FormFactorCosineRipple.h  | 18 +++---
 Sample/HardParticle/FormFactorCuboctahedron.h |  8 +--
 Sample/HardParticle/FormFactorCylinder.h      | 12 ++--
 Sample/HardParticle/FormFactorDodecahedron.h  |  6 +-
 Sample/HardParticle/FormFactorDot.h           | 14 ++--
 .../FormFactorEllipsoidalCylinder.h           | 12 ++--
 Sample/HardParticle/FormFactorFullSphere.h    | 18 +++---
 Sample/HardParticle/FormFactorFullSpheroid.h  | 12 ++--
 Sample/HardParticle/FormFactorHemiEllipsoid.h | 10 +--
 Sample/HardParticle/FormFactorHollowSphere.h  | 10 +--
 Sample/HardParticle/FormFactorIcosahedron.h   |  6 +-
 Sample/HardParticle/FormFactorLongBoxGauss.h  | 12 ++--
 .../HardParticle/FormFactorLongBoxLorentz.h   | 12 ++--
 Sample/HardParticle/FormFactorPrism3.h        |  8 +--
 Sample/HardParticle/FormFactorPrism6.h        |  8 +--
 Sample/HardParticle/FormFactorPyramid.h       |  8 +--
 .../HardParticle/FormFactorSawtoothRipple.h   | 18 +++---
 Sample/HardParticle/FormFactorTetrahedron.h   |  8 +--
 Sample/HardParticle/FormFactorTruncatedCube.h |  6 +-
 .../HardParticle/FormFactorTruncatedSphere.h  | 12 ++--
 .../FormFactorTruncatedSpheroid.h             | 12 ++--
 Sample/HardParticle/IFormFactorPolyhedron.h   | 10 +--
 Sample/HardParticle/IFormFactorPrism.h        |  4 +-
 Sample/HardParticle/IProfileRipple.h          | 10 +--
 Sample/Material/MagneticMaterialImpl.h        | 12 ++--
 Sample/Multilayer/Layer.h                     |  8 +--
 Sample/Multilayer/MultiLayer.h                |  6 +-
 Sample/Particle/Crystal.h                     |  6 +-
 Sample/Particle/FormFactorCoreShell.h         | 18 +++---
 Sample/Particle/FormFactorCrystal.h           | 18 +++---
 Sample/Particle/FormFactorWeighted.h          | 18 +++---
 Sample/Particle/IParticle.h                   |  4 +-
 Sample/Particle/MesoCrystal.h                 |  8 +--
 Sample/Particle/Particle.h                    | 10 +--
 Sample/Particle/ParticleComposition.h         | 12 ++--
 Sample/Particle/ParticleCoreShell.h           |  8 +--
 Sample/Particle/ParticleDistribution.h        | 10 +--
 .../Scattering/FormFactorDecoratorMaterial.h  | 10 +--
 .../FormFactorDecoratorPositionFactor.h       | 12 ++--
 .../Scattering/FormFactorDecoratorRotation.h  | 12 ++--
 Sample/SoftParticle/FormFactorGauss.h         | 10 +--
 .../FormFactorSphereGaussianRadius.h          | 10 +--
 .../FormFactorSphereLogNormalRadius.h         | 10 +--
 70 files changed, 423 insertions(+), 423 deletions(-)

diff --git a/Base/Axis/ConstKBinAxis.h b/Base/Axis/ConstKBinAxis.h
index d6ad1b8d284..4868b26ff7a 100644
--- a/Base/Axis/ConstKBinAxis.h
+++ b/Base/Axis/ConstKBinAxis.h
@@ -20,7 +20,7 @@
 //! Axis with fixed bin size in sin(angle) space.
 //! @ingroup tools
 
-class ConstKBinAxis : public VariableBinAxis
+class ConstKBinAxis final: public VariableBinAxis
 {
 public:
     //! ConstKBinAxis constructor.
@@ -29,17 +29,17 @@ public:
     //! @param start low edge of first bin
     //! @param end upper edge of last bin
     ConstKBinAxis(const std::string& name, size_t nbins, double start, double end);
-    ~ConstKBinAxis() final {}
+    ~ConstKBinAxis() override {}
 
-    ConstKBinAxis* clone() const final;
+    ConstKBinAxis* clone() const override;
 
-    ConstKBinAxis* createClippedAxis(double left, double right) const final;
+    ConstKBinAxis* createClippedAxis(double left, double right) const override;
 
 protected:
     ConstKBinAxis(const std::string& name, size_t nbins);
 
-    void print(std::ostream& ostr) const final;
-    bool equals(const IAxis& other) const final;
+    void print(std::ostream& ostr) const override;
+    bool equals(const IAxis& other) const override;
 
     double m_start;
     double m_end;
diff --git a/Core/Computation/ConstantBackground.h b/Core/Computation/ConstantBackground.h
index 9d2c5616fc7..4bef013d94d 100644
--- a/Core/Computation/ConstantBackground.h
+++ b/Core/Computation/ConstantBackground.h
@@ -27,13 +27,13 @@ public:
     ConstantBackground(const std::vector<double> P);
     ConstantBackground(double background_value);
 
-    ConstantBackground* clone() const override final;
+    ConstantBackground* clone() const final;
 
     double backgroundValue() const { return m_background_value; }
 
     void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
-    double addBackground(double intensity) const override final;
+    double addBackground(double intensity) const final;
 
 private:
     const double& m_background_value;
diff --git a/Core/Computation/PoissonNoiseBackground.h b/Core/Computation/PoissonNoiseBackground.h
index 674d7340114..9b668b5a273 100644
--- a/Core/Computation/PoissonNoiseBackground.h
+++ b/Core/Computation/PoissonNoiseBackground.h
@@ -25,11 +25,11 @@ class PoissonNoiseBackground : public IBackground
 {
 public:
     PoissonNoiseBackground();
-    PoissonNoiseBackground* clone() const override final;
+    PoissonNoiseBackground* clone() const final;
 
     void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
-    double addBackground(double intensity) const override final;
+    double addBackground(double intensity) const final;
 };
 
 #endif // BORNAGAIN_CORE_COMPUTATION_POISSONNOISEBACKGROUND_H
diff --git a/Core/Simulation/DepthProbeSimulation.h b/Core/Simulation/DepthProbeSimulation.h
index 094acee74d8..bd5b9527752 100644
--- a/Core/Simulation/DepthProbeSimulation.h
+++ b/Core/Simulation/DepthProbeSimulation.h
@@ -38,7 +38,7 @@ public:
 
     DepthProbeSimulation* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     //! Returns the results of the simulation in a format that supports unit conversion and export
     //! to numpy arrays
diff --git a/Core/Simulation/OffSpecSimulation.h b/Core/Simulation/OffSpecSimulation.h
index 1c2c443b479..af7390ca464 100644
--- a/Core/Simulation/OffSpecSimulation.h
+++ b/Core/Simulation/OffSpecSimulation.h
@@ -23,18 +23,18 @@ class Histogram2D;
 //! Main class to run an off-specular simulation.
 //! @ingroup simulation
 
-class OffSpecSimulation : public ISimulation2D
+class OffSpecSimulation final: public ISimulation2D
 {
 public:
     OffSpecSimulation();
-    ~OffSpecSimulation() final {}
+    ~OffSpecSimulation() override {}
 
     OffSpecSimulation* clone() const override { return new OffSpecSimulation(*this); }
 
-    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     //! Put into a clean state for running a simulation
-    void prepareSimulation() final;
+    void prepareSimulation() override;
 
     //! Returns the results of the simulation in a format that supports unit conversion and export
     //! to numpy arrays
@@ -70,7 +70,7 @@ private:
     void updateIntensityMap() override;
 
     //! Gets the number of elements this simulation needs to calculate
-    size_t numberOfSimulationElements() const final;
+    size_t numberOfSimulationElements() const override;
 
     //! Normalize, apply detector resolution and transfer detector image corresponding to
     //! alpha_i = m_alpha_i_axis->bin(index)
diff --git a/Core/Simulation/SpecularSimulation.h b/Core/Simulation/SpecularSimulation.h
index 00a27e11674..48663862dfe 100644
--- a/Core/Simulation/SpecularSimulation.h
+++ b/Core/Simulation/SpecularSimulation.h
@@ -40,7 +40,7 @@ public:
     //! Put into a clean state for running a simulation.
     void prepareSimulation() override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     //! Returns the results of the simulation in a format that supports unit conversion and export
     //! to numpy arrays. If simulation was not run, returns an array of proper size filled with
diff --git a/Device/Detector/SimpleUnitConverters.h b/Device/Detector/SimpleUnitConverters.h
index b07e921f103..5177ef55421 100644
--- a/Device/Detector/SimpleUnitConverters.h
+++ b/Device/Detector/SimpleUnitConverters.h
@@ -34,16 +34,16 @@ public:
     UnitConverterSimple(const Beam& beam);
     ~UnitConverterSimple() override = default;
 
-    virtual size_t dimension() const final;
+    virtual size_t dimension() const override;
 
-    double calculateMin(size_t i_axis, Axes::Units units_type) const final;
-    double calculateMax(size_t i_axis, Axes::Units units_type) const final;
-    size_t axisSize(size_t i_axis) const final;
+    double calculateMin(size_t i_axis, Axes::Units units_type) const override;
+    double calculateMax(size_t i_axis, Axes::Units units_type) const override;
+    size_t axisSize(size_t i_axis) const override;
 
     //! Returns the list of all available units
     std::vector<Axes::Units> availableUnits() const override;
 
-    std::unique_ptr<IAxis> createConvertedAxis(size_t i_axis, Axes::Units units) const final;
+    std::unique_ptr<IAxis> createConvertedAxis(size_t i_axis, Axes::Units units) const override;
 
 protected:
     UnitConverterSimple(const UnitConverterSimple& other);
@@ -73,47 +73,47 @@ private:
 //! Its default units are radians for both axes
 //! @ingroup simulation_internal
 
-class SphericalConverter : public UnitConverterSimple
+class SphericalConverter final: public UnitConverterSimple
 {
 public:
     SphericalConverter(const SphericalDetector& detector, const Beam& beam);
 
-    ~SphericalConverter() final;
+    ~SphericalConverter() override;
 
-    SphericalConverter* clone() const final;
+    SphericalConverter* clone() const override;
 
     //! Returns the list of all available units
-    std::vector<Axes::Units> availableUnits() const final;
+    std::vector<Axes::Units> availableUnits() const override;
 
-    Axes::Units defaultUnits() const final;
+    Axes::Units defaultUnits() const override;
 
 private:
     SphericalConverter(const SphericalConverter& other);
-    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const final;
-    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const final;
+    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const override;
+    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const override;
 };
 
 //! IUnitConverter class that handles the unit translations for rectangular detectors
 //! Its default units are mm for both axes
 //! @ingroup simulation_internal
 
-class RectangularConverter : public UnitConverterSimple
+class RectangularConverter final: public UnitConverterSimple
 {
 public:
     RectangularConverter(const RectangularDetector& detector, const Beam& beam);
-    ~RectangularConverter() final;
+    ~RectangularConverter() override;
 
-    RectangularConverter* clone() const final;
+    RectangularConverter* clone() const override;
 
     //! Returns the list of all available units
-    std::vector<Axes::Units> availableUnits() const final;
+    std::vector<Axes::Units> availableUnits() const override;
 
-    Axes::Units defaultUnits() const final;
+    Axes::Units defaultUnits() const override;
 
 private:
     RectangularConverter(const RectangularConverter& other);
-    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const final;
-    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const final;
+    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const override;
+    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const override;
     kvector_t normalizeToWavelength(kvector_t vector) const;
     double axisAngle(size_t i_axis, kvector_t k_f) const;
     std::unique_ptr<RectangularPixel> m_detector_pixel;
@@ -124,20 +124,20 @@ private:
 //! Its default units are radians for both axes
 //! @ingroup simulation_internal
 
-class OffSpecularConverter : public UnitConverterSimple
+class OffSpecularConverter final: public UnitConverterSimple
 {
 public:
     OffSpecularConverter(const IDetector2D& detector, const Beam& beam, const IAxis& alpha_axis);
-    ~OffSpecularConverter() final;
+    ~OffSpecularConverter() override;
 
-    OffSpecularConverter* clone() const final;
+    OffSpecularConverter* clone() const override;
 
-    Axes::Units defaultUnits() const final;
+    Axes::Units defaultUnits() const override;
 
 private:
     OffSpecularConverter(const OffSpecularConverter& other);
-    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const final;
-    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const final;
+    double calculateValue(size_t i_axis, Axes::Units units_type, double value) const override;
+    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const override;
     void addDetectorYAxis(const IDetector2D& detector);
 };
 
@@ -145,23 +145,23 @@ private:
 //! Its default units are radians for x-axis and nm for y-axis
 //! @ingroup simulation_internal
 
-class DepthProbeConverter : public UnitConverterSimple
+class DepthProbeConverter final: public UnitConverterSimple
 {
 public:
     DepthProbeConverter(const Beam& beam, const IAxis& alpha_axis, const IAxis& z_axis);
-    ~DepthProbeConverter() final;
+    ~DepthProbeConverter() override;
 
-    DepthProbeConverter* clone() const final;
+    DepthProbeConverter* clone() const override;
 
     //! Returns the list of all available units
-    std::vector<Axes::Units> availableUnits() const final;
+    std::vector<Axes::Units> availableUnits() const override;
 
-    Axes::Units defaultUnits() const final { return Axes::Units::DEGREES; }
+    Axes::Units defaultUnits() const override { return Axes::Units::DEGREES; }
 
 private:
     DepthProbeConverter(const DepthProbeConverter& other);
-    double calculateValue(size_t, Axes::Units units_type, double value) const final;
-    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const final;
+    double calculateValue(size_t, Axes::Units units_type, double value) const override;
+    std::vector<std::map<Axes::Units, std::string>> createNameMaps() const override;
     void checkUnits(Axes::Units units_type) const;
 };
 
diff --git a/Fit/Adapter/MinimizerAdapter.h b/Fit/Adapter/MinimizerAdapter.h
index 3f965b18dbb..6b3f99b4d2b 100644
--- a/Fit/Adapter/MinimizerAdapter.h
+++ b/Fit/Adapter/MinimizerAdapter.h
@@ -50,14 +50,14 @@ public:
                                                mumufit::Parameters parameters) override;
 
     //! Returns name of the minimizer.
-    std::string minimizerName() const override final;
+    std::string minimizerName() const final;
 
     //! Returns name of the minimization algorithm.
-    std::string algorithmName() const override final;
+    std::string algorithmName() const final;
 
     void setParameters(const mumufit::Parameters& parameters);
 
-    double minValue() const override final;
+    double minValue() const final;
 
     MinimizerOptions& options() { return m_options; }
     const MinimizerOptions& options() const { return m_options; }
@@ -72,7 +72,7 @@ public:
     virtual std::map<std::string, std::string> statusMap() const;
 
     //! Sets option string to the minimizer
-    void setOptions(const std::string& optionString) override final;
+    void setOptions(const std::string& optionString) final;
 
 protected:
     MinimizerAdapter(const MinimizerInfo& minimizerInfo);
diff --git a/GUI/coregui/Models/ParameterTranslators.h b/GUI/coregui/Models/ParameterTranslators.h
index 6acc33fe1a5..721d70ac46a 100644
--- a/GUI/coregui/Models/ParameterTranslators.h
+++ b/GUI/coregui/Models/ParameterTranslators.h
@@ -29,65 +29,65 @@ public:
     virtual QStringList translate(const QStringList& list) const = 0;
 };
 
-class ModelTypeTranslator : public IPathTranslator
+class ModelTypeTranslator final: public IPathTranslator
 {
 public:
     ModelTypeTranslator(QString gui_model_type, QString domain_name);
-    ~ModelTypeTranslator() final {}
+    ~ModelTypeTranslator() override {}
 
-    ModelTypeTranslator* clone() const final;
+    ModelTypeTranslator* clone() const override;
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 
 private:
     QString m_gui_model_type;
     QString m_domain_name;
 };
 
-class AddElementTranslator : public IPathTranslator
+class AddElementTranslator final: public IPathTranslator
 {
 public:
     AddElementTranslator(QString gui_name, QString additional_name);
-    ~AddElementTranslator() final {}
+    ~AddElementTranslator() override {}
 
-    AddElementTranslator* clone() const final;
+    AddElementTranslator* clone() const override;
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 
 private:
     QString m_gui_name;
     QString m_additional_name;
 };
 
-class RotationTranslator : public IPathTranslator
+class RotationTranslator final: public IPathTranslator
 {
 public:
-    ~RotationTranslator() final {}
+    ~RotationTranslator() override {}
 
-    RotationTranslator* clone() const final { return new RotationTranslator; }
+    RotationTranslator* clone() const override { return new RotationTranslator; }
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 };
 
-class DistributionNoneTranslator : public IPathTranslator
+class DistributionNoneTranslator final: public IPathTranslator
 {
 public:
-    ~DistributionNoneTranslator() final {}
+    ~DistributionNoneTranslator() override {}
 
-    DistributionNoneTranslator* clone() const final { return new DistributionNoneTranslator; }
+    DistributionNoneTranslator* clone() const override { return new DistributionNoneTranslator; }
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 };
 
-class RoughnessTranslator : public IPathTranslator
+class RoughnessTranslator final: public IPathTranslator
 {
 public:
     RoughnessTranslator(const SessionItem* p_parent);
-    ~RoughnessTranslator() final {}
+    ~RoughnessTranslator() override {}
 
-    RoughnessTranslator* clone() const final;
+    RoughnessTranslator* clone() const override;
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 
 private:
     int getLayerIndex(QString layerName) const;
@@ -95,16 +95,16 @@ private:
     const SessionItem* m_parent;
 };
 
-class VectorParameterTranslator : public IPathTranslator
+class VectorParameterTranslator final: public IPathTranslator
 {
 public:
     VectorParameterTranslator(QString gui_name, std::string base_name,
                               QStringList additional_names = {});
-    ~VectorParameterTranslator() final {}
+    ~VectorParameterTranslator() override {}
 
-    VectorParameterTranslator* clone() const final;
+    VectorParameterTranslator* clone() const override;
 
-    QStringList translate(const QStringList& list) const final;
+    QStringList translate(const QStringList& list) const override;
 
 private:
     QString m_gui_name;
diff --git a/Sample/Aggregate/InterferenceFunction1DLattice.h b/Sample/Aggregate/InterferenceFunction1DLattice.h
index 1b584abcaf1..eb859e524f6 100644
--- a/Sample/Aggregate/InterferenceFunction1DLattice.h
+++ b/Sample/Aggregate/InterferenceFunction1DLattice.h
@@ -22,25 +22,25 @@ class IFTDecayFunction1D;
 //! Interference function of a 1D lattice.
 //! @ingroup interference
 
-class InterferenceFunction1DLattice : public IInterferenceFunction
+class InterferenceFunction1DLattice final: public IInterferenceFunction
 {
 public:
     InterferenceFunction1DLattice(double length, double xi);
-    ~InterferenceFunction1DLattice() final;
+    ~InterferenceFunction1DLattice() override;
 
-    InterferenceFunction1DLattice* clone() const override final;
+    InterferenceFunction1DLattice* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setDecayFunction(const IFTDecayFunction1D& decay);
 
     double getLength() const { return m_length; }
     double getXi() const { return m_xi; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const override;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
 
     double m_length;
     double m_xi;
diff --git a/Sample/Aggregate/InterferenceFunction2DLattice.h b/Sample/Aggregate/InterferenceFunction2DLattice.h
index 0509f9d1f62..b5b41f19200 100644
--- a/Sample/Aggregate/InterferenceFunction2DLattice.h
+++ b/Sample/Aggregate/InterferenceFunction2DLattice.h
@@ -23,15 +23,15 @@
 //! Interference function of a 2D lattice.
 //! @ingroup interference
 
-class InterferenceFunction2DLattice : public IInterferenceFunction
+class InterferenceFunction2DLattice final: public IInterferenceFunction
 {
 public:
     InterferenceFunction2DLattice(const Lattice2D& lattice);
-    ~InterferenceFunction2DLattice() final;
+    ~InterferenceFunction2DLattice() override;
 
-    InterferenceFunction2DLattice* clone() const override final;
+    InterferenceFunction2DLattice* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setDecayFunction(const IFTDecayFunction2D& decay);
 
@@ -41,14 +41,14 @@ public:
     const Lattice2D& lattice() const;
 
     //! Returns the particle density associated with this 2d lattice
-    double getParticleDensity() const override final;
+    double getParticleDensity() const override;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const override;
 
-    void onChange() override final;
+    void onChange() override;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
 
     double interferenceForXi(double xi) const;
 
diff --git a/Sample/Aggregate/InterferenceFunction2DParaCrystal.h b/Sample/Aggregate/InterferenceFunction2DParaCrystal.h
index 647122b3927..bb35ae1f808 100644
--- a/Sample/Aggregate/InterferenceFunction2DParaCrystal.h
+++ b/Sample/Aggregate/InterferenceFunction2DParaCrystal.h
@@ -26,17 +26,17 @@ class IFTDistribution2D;
 //! Interference function of a 2D paracrystal.
 //! @ingroup interference
 
-class InterferenceFunction2DParaCrystal : public IInterferenceFunction
+class InterferenceFunction2DParaCrystal final: public IInterferenceFunction
 {
 public:
     InterferenceFunction2DParaCrystal(const Lattice2D& lattice, double damping_length,
                                       double domain_size_1, double domain_size_2);
 
-    ~InterferenceFunction2DParaCrystal() final;
+    ~InterferenceFunction2DParaCrystal() override;
 
-    InterferenceFunction2DParaCrystal* clone() const override final;
+    InterferenceFunction2DParaCrystal* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setDomainSizes(double size_1, double size_2);
 
@@ -53,16 +53,16 @@ public:
 
     const Lattice2D& lattice() const;
 
-    double getParticleDensity() const override final;
+    double getParticleDensity() const override;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const override;
 
     const IFTDistribution2D* pdf1() const { return m_pdf1.get(); }
 
     const IFTDistribution2D* pdf2() const { return m_pdf2.get(); }
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
 
     double interferenceForXi(double xi) const;
     double interference1D(double qx, double qy, double xi, size_t index) const;
diff --git a/Sample/Aggregate/InterferenceFunction2DSuperLattice.h b/Sample/Aggregate/InterferenceFunction2DSuperLattice.h
index 6eed25ceff2..12bee07eea8 100644
--- a/Sample/Aggregate/InterferenceFunction2DSuperLattice.h
+++ b/Sample/Aggregate/InterferenceFunction2DSuperLattice.h
@@ -22,22 +22,22 @@
 //! each lattice site.
 //! @ingroup interference
 
-class InterferenceFunction2DSuperLattice : public IInterferenceFunction
+class InterferenceFunction2DSuperLattice final: public IInterferenceFunction
 {
 public:
     InterferenceFunction2DSuperLattice(const Lattice2D& lattice, unsigned size_1, unsigned size_2);
     InterferenceFunction2DSuperLattice(double length_1, double length_2, double alpha, double xi,
                                        unsigned size_1, unsigned size_2);
-    ~InterferenceFunction2DSuperLattice() final;
+    ~InterferenceFunction2DSuperLattice() override;
 
-    InterferenceFunction2DSuperLattice* clone() const override final;
+    InterferenceFunction2DSuperLattice* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setSubstructureIFF(const IInterferenceFunction& sub_iff);
     const IInterferenceFunction& substructureIFF() const;
 
-    double evaluate(const kvector_t q, double outer_iff = 1.0) const override final;
+    double evaluate(const kvector_t q, double outer_iff = 1.0) const override;
     unsigned domainSize1() const { return m_size_1; }
     unsigned domainSize2() const { return m_size_2; }
 
@@ -46,10 +46,10 @@ public:
 
     const Lattice2D& lattice() const;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const override;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
 
     double interferenceForXi(double xi) const;
 
diff --git a/Sample/Aggregate/InterferenceFunction3DLattice.h b/Sample/Aggregate/InterferenceFunction3DLattice.h
index cb260a06002..d51fc0dda9e 100644
--- a/Sample/Aggregate/InterferenceFunction3DLattice.h
+++ b/Sample/Aggregate/InterferenceFunction3DLattice.h
@@ -23,28 +23,28 @@ class IPeakShape;
 //! Interference function of a 3D lattice.
 //! @ingroup interference
 
-class InterferenceFunction3DLattice : public IInterferenceFunction
+class InterferenceFunction3DLattice final: public IInterferenceFunction
 {
 public:
     InterferenceFunction3DLattice(const Lattice3D& lattice);
-    ~InterferenceFunction3DLattice() final;
+    ~InterferenceFunction3DLattice() override;
 
-    InterferenceFunction3DLattice* clone() const override final;
+    InterferenceFunction3DLattice* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setPeakShape(const IPeakShape& peak_shape);
 
     const Lattice3D& lattice() const;
 
-    bool supportsMultilayer() const override final { return false; }
+    bool supportsMultilayer() const override { return false; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const override;
 
-    void onChange() override final;
+    void onChange() override;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
     void initRecRadius();
 
     Lattice3D m_lattice; // TODO ASAP unique_ptr as in otehr InterferenceFunction%s
diff --git a/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h b/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h
index b34fd4d2aa9..ec9d14f2f64 100644
--- a/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h
+++ b/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h
@@ -27,9 +27,9 @@ public:
     InterferenceFunctionFinite2DLattice(const Lattice2D& lattice, unsigned N_1, unsigned N_2);
     ~InterferenceFunctionFinite2DLattice() final;
 
-    InterferenceFunctionFinite2DLattice* clone() const override final;
+    InterferenceFunctionFinite2DLattice* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     unsigned numberUnitCells1() const { return m_N_1; }
     unsigned numberUnitCells2() const { return m_N_2; }
@@ -40,12 +40,12 @@ public:
     const Lattice2D& lattice() const;
 
     //! Returns the particle density associated with this 2d lattice
-    double getParticleDensity() const override final;
+    double getParticleDensity() const final;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const final;
 
     double interferenceForXi(double xi) const;
 
diff --git a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
index 8e7c4c3b746..16846be6d01 100644
--- a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
+++ b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
@@ -28,9 +28,9 @@ public:
                                         unsigned N_3);
     ~InterferenceFunctionFinite3DLattice() final;
 
-    InterferenceFunctionFinite3DLattice* clone() const override final;
+    InterferenceFunctionFinite3DLattice* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     unsigned numberUnitCells1() const { return m_N_1; }
     unsigned numberUnitCells2() const { return m_N_2; }
@@ -38,12 +38,12 @@ public:
 
     const Lattice3D& lattice() const;
 
-    bool supportsMultilayer() const override final { return false; }
+    bool supportsMultilayer() const final { return false; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const final;
     void setLattice(const Lattice3D& lattice);
 
     std::unique_ptr<Lattice3D> m_lattice;
diff --git a/Sample/Aggregate/InterferenceFunctionHardDisk.h b/Sample/Aggregate/InterferenceFunctionHardDisk.h
index 52597deafd5..f491dd31aab 100644
--- a/Sample/Aggregate/InterferenceFunctionHardDisk.h
+++ b/Sample/Aggregate/InterferenceFunctionHardDisk.h
@@ -24,23 +24,23 @@
 //! DOI: 10.1080/00268979500101211
 //! @ingroup interference
 
-class InterferenceFunctionHardDisk : public IInterferenceFunction
+class InterferenceFunctionHardDisk final: public IInterferenceFunction
 {
 public:
     InterferenceFunctionHardDisk(double radius, double density, double position_var = 0);
-    ~InterferenceFunctionHardDisk() final = default;
+    ~InterferenceFunctionHardDisk() override = default;
 
-    InterferenceFunctionHardDisk* clone() const override final;
+    InterferenceFunctionHardDisk* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
-    double getParticleDensity() const override final;
+    double getParticleDensity() const override;
 
     double radius() const;
     double density() const;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const override;
     double packingRatio() const;
     double integrand(double x) const;
 
diff --git a/Sample/Aggregate/InterferenceFunctionNone.h b/Sample/Aggregate/InterferenceFunctionNone.h
index ad714ecfbd2..231f8d15740 100644
--- a/Sample/Aggregate/InterferenceFunctionNone.h
+++ b/Sample/Aggregate/InterferenceFunctionNone.h
@@ -25,12 +25,12 @@ class InterferenceFunctionNone : public IInterferenceFunction
 public:
     InterferenceFunctionNone();
 
-    InterferenceFunctionNone* clone() const override final;
+    InterferenceFunctionNone* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const final;
 };
 
 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONNONE_H
diff --git a/Sample/Aggregate/InterferenceFunctionRadialParaCrystal.h b/Sample/Aggregate/InterferenceFunctionRadialParaCrystal.h
index 350478c13ce..e9f4a8e7245 100644
--- a/Sample/Aggregate/InterferenceFunctionRadialParaCrystal.h
+++ b/Sample/Aggregate/InterferenceFunctionRadialParaCrystal.h
@@ -27,9 +27,9 @@ class InterferenceFunctionRadialParaCrystal : public IInterferenceFunction
 {
 public:
     InterferenceFunctionRadialParaCrystal(double peak_distance, double damping_length);
-    InterferenceFunctionRadialParaCrystal* clone() const override final;
+    InterferenceFunctionRadialParaCrystal* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     void setKappa(double kappa);
     double kappa() const;
@@ -45,12 +45,12 @@ public:
 
     double dampingLength() const { return m_damping_length; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
     double randomSample() const { return m_pdf->createSampler()->randomSample(); }
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const final;
     void init_parameters();
 
     double m_peak_distance;  //!< the distance to the first neighbor peak
diff --git a/Sample/Aggregate/InterferenceFunctionTwin.h b/Sample/Aggregate/InterferenceFunctionTwin.h
index 52592a371cb..a8ab69e36dd 100644
--- a/Sample/Aggregate/InterferenceFunctionTwin.h
+++ b/Sample/Aggregate/InterferenceFunctionTwin.h
@@ -26,16 +26,16 @@ class InterferenceFunctionTwin : public IInterferenceFunction
 public:
     InterferenceFunctionTwin(const kvector_t& direction, double mean_distance, double std_dev);
 
-    InterferenceFunctionTwin* clone() const override final;
+    InterferenceFunctionTwin* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     kvector_t direction() const;
     double meanDistance() const;
     double stdDev() const;
 
 private:
-    double iff_without_dw(const kvector_t q) const override final;
+    double iff_without_dw(const kvector_t q) const final;
 
     kvector_t m_direction;
     double m_distance;
diff --git a/Sample/Correlations/FTDistributions1D.h b/Sample/Correlations/FTDistributions1D.h
index 453ca4d35f1..e5a54116031 100644
--- a/Sample/Correlations/FTDistributions1D.h
+++ b/Sample/Correlations/FTDistributions1D.h
@@ -57,13 +57,13 @@ public:
     FTDistribution1DCauchy(const std::vector<double> P);
     FTDistribution1DCauchy(double omega);
 
-    FTDistribution1DCauchy* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DCauchy* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 };
 
@@ -77,13 +77,13 @@ public:
     FTDistribution1DGauss(const std::vector<double> P);
     FTDistribution1DGauss(double omega);
 
-    FTDistribution1DGauss* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DGauss* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 };
 
@@ -97,13 +97,13 @@ public:
     FTDistribution1DGate(const std::vector<double> P);
     FTDistribution1DGate(double omega);
 
-    FTDistribution1DGate* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DGate* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 };
 
@@ -117,13 +117,13 @@ public:
     FTDistribution1DTriangle(const std::vector<double> P);
     FTDistribution1DTriangle(double omega);
 
-    FTDistribution1DTriangle* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DTriangle* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 };
 
@@ -138,13 +138,13 @@ public:
     FTDistribution1DCosine(const std::vector<double> P);
     FTDistribution1DCosine(double omega);
 
-    FTDistribution1DCosine* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DCosine* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 };
 
@@ -159,14 +159,14 @@ public:
     FTDistribution1DVoigt(const std::vector<double> P);
     FTDistribution1DVoigt(double omega, double eta);
 
-    FTDistribution1DVoigt* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
-    double evaluate(double q) const override final;
+    FTDistribution1DVoigt* clone() const final;
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
+    double evaluate(double q) const final;
     double eta() const { return m_eta; }
 
-    double qSecondDerivative() const override final;
+    double qSecondDerivative() const final;
 #ifndef SWIG
-    std::unique_ptr<IDistribution1DSampler> createSampler() const override final;
+    std::unique_ptr<IDistribution1DSampler> createSampler() const final;
 #endif
 
 protected:
diff --git a/Sample/Fresnel/MatrixFresnelMap.h b/Sample/Fresnel/MatrixFresnelMap.h
index 8ce828c6021..4f5d8b31933 100644
--- a/Sample/Fresnel/MatrixFresnelMap.h
+++ b/Sample/Fresnel/MatrixFresnelMap.h
@@ -42,9 +42,9 @@ public:
 
     std::unique_ptr<const ILayerRTCoefficients>
     getOutCoefficients(const SimulationElement& sim_element,
-                       size_t layer_index) const final override;
+                       size_t layer_index) const final;
 
-    void setSlices(const std::vector<Slice>& slices) final override;
+    void setSlices(const std::vector<Slice>& slices) final;
 
 private:
     //! Provides a hash function for a 3-vector of doubles, for use in MatrixFresnelMap.
diff --git a/Sample/HardParticle/FormFactorAnisoPyramid.h b/Sample/HardParticle/FormFactorAnisoPyramid.h
index fbf563c4a8d..f136a31f2c6 100644
--- a/Sample/HardParticle/FormFactorAnisoPyramid.h
+++ b/Sample/HardParticle/FormFactorAnisoPyramid.h
@@ -26,11 +26,11 @@ public:
     FormFactorAnisoPyramid(const std::vector<double> P);
     FormFactorAnisoPyramid(double length, double width, double height, double alpha);
 
-    FormFactorAnisoPyramid* clone() const override final
+    FormFactorAnisoPyramid* clone() const final
     {
         return new FormFactorAnisoPyramid(m_length, m_width, m_height, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getWidth() const { return m_width; }
@@ -39,9 +39,9 @@ public:
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorBox.h b/Sample/HardParticle/FormFactorBox.h
index 1a8c78b2120..1638b40c432 100644
--- a/Sample/HardParticle/FormFactorBox.h
+++ b/Sample/HardParticle/FormFactorBox.h
@@ -26,25 +26,25 @@ public:
     FormFactorBox(const std::vector<double> P);
     FormFactorBox(double length, double width, double height);
 
-    FormFactorBox* clone() const override final
+    FormFactorBox* clone() const final
     {
         return new FormFactorBox(m_length, m_width, m_height);
     }
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getWidth() const { return m_width; }
 
-    double volume() const override final { return m_length * m_height * m_width; }
-    double radialExtension() const override final { return m_length / 2.0; }
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    double volume() const final { return m_length * m_height * m_width; }
+    double radialExtension() const final { return m_length / 2.0; }
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
     double height() const final { return m_height; }
 
 private:
diff --git a/Sample/HardParticle/FormFactorCantellatedCube.h b/Sample/HardParticle/FormFactorCantellatedCube.h
index e9352f73ba3..bdb15d69a7e 100644
--- a/Sample/HardParticle/FormFactorCantellatedCube.h
+++ b/Sample/HardParticle/FormFactorCantellatedCube.h
@@ -26,17 +26,17 @@ public:
     FormFactorCantellatedCube(const std::vector<double> P);
     FormFactorCantellatedCube(double length, double removed_length);
 
-    FormFactorCantellatedCube* clone() const override final
+    FormFactorCantellatedCube* clone() const final
     {
         return new FormFactorCantellatedCube(m_length, m_removed_length);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getRemovedLength() const { return m_removed_length; }
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorCone.h b/Sample/HardParticle/FormFactorCone.h
index 09e9da514fc..4a26b159afe 100644
--- a/Sample/HardParticle/FormFactorCone.h
+++ b/Sample/HardParticle/FormFactorCone.h
@@ -26,25 +26,25 @@ public:
     FormFactorCone(const std::vector<double> P);
     FormFactorCone(double radius, double height, double alpha);
 
-    FormFactorCone* clone() const override final
+    FormFactorCone* clone() const final
     {
         return new FormFactorCone(m_radius, m_height, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getAlpha() const { return m_alpha; }
     double getRadius() const { return m_radius; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     complex_t Integrand(double Z) const;
diff --git a/Sample/HardParticle/FormFactorCone6.h b/Sample/HardParticle/FormFactorCone6.h
index a56f4421a93..9af35b57d7b 100644
--- a/Sample/HardParticle/FormFactorCone6.h
+++ b/Sample/HardParticle/FormFactorCone6.h
@@ -26,11 +26,11 @@ public:
     FormFactorCone6(const std::vector<double> P);
     FormFactorCone6(double base_edge, double height, double alpha);
 
-    FormFactorCone6* clone() const override final
+    FormFactorCone6* clone() const final
     {
         return new FormFactorCone6(m_base_edge, m_height, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getBaseEdge() const { return m_base_edge; }
     double getHeight() const { return m_height; }
@@ -38,9 +38,9 @@ public:
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorCosineRipple.h b/Sample/HardParticle/FormFactorCosineRipple.h
index 76fcca80d25..945900c33d9 100644
--- a/Sample/HardParticle/FormFactorCosineRipple.h
+++ b/Sample/HardParticle/FormFactorCosineRipple.h
@@ -24,11 +24,11 @@ class FormFactorCosineRippleBox : public ICosineRipple
 public:
     FormFactorCosineRippleBox(const std::vector<double> P);
     FormFactorCosineRippleBox(double length, double width, double height);
-    FormFactorCosineRippleBox* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorCosineRippleBox* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 //! The form factor for a cosine ripple, with Gaussian profile in elongation direction.
@@ -38,11 +38,11 @@ class FormFactorCosineRippleGauss : public ICosineRipple
 public:
     FormFactorCosineRippleGauss(const std::vector<double> P);
     FormFactorCosineRippleGauss(double length, double width, double height);
-    FormFactorCosineRippleGauss* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorCosineRippleGauss* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 //! The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
@@ -52,11 +52,11 @@ class FormFactorCosineRippleLorentz : public ICosineRipple
 public:
     FormFactorCosineRippleLorentz(const std::vector<double> P);
     FormFactorCosineRippleLorentz(double length, double width, double height);
-    FormFactorCosineRippleLorentz* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorCosineRippleLorentz* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORCOSINERIPPLE_H
diff --git a/Sample/HardParticle/FormFactorCuboctahedron.h b/Sample/HardParticle/FormFactorCuboctahedron.h
index 2426446dfef..cc4e18760e5 100644
--- a/Sample/HardParticle/FormFactorCuboctahedron.h
+++ b/Sample/HardParticle/FormFactorCuboctahedron.h
@@ -26,11 +26,11 @@ public:
     FormFactorCuboctahedron(const std::vector<double> P);
     FormFactorCuboctahedron(double length, double height, double height_ratio, double alpha);
 
-    FormFactorCuboctahedron* clone() const override final
+    FormFactorCuboctahedron* clone() const final
     {
         return new FormFactorCuboctahedron(m_length, m_height, m_height_ratio, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getHeight() const { return m_height; }
@@ -39,9 +39,9 @@ public:
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorCylinder.h b/Sample/HardParticle/FormFactorCylinder.h
index 8cf3daf7dd8..478cb82317e 100644
--- a/Sample/HardParticle/FormFactorCylinder.h
+++ b/Sample/HardParticle/FormFactorCylinder.h
@@ -26,24 +26,24 @@ public:
     FormFactorCylinder(const std::vector<double> P);
     FormFactorCylinder(double radius, double height);
 
-    FormFactorCylinder* clone() const override final
+    FormFactorCylinder* clone() const final
     {
         return new FormFactorCylinder(m_radius, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getRadius() const { return m_radius; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_radius;
diff --git a/Sample/HardParticle/FormFactorDodecahedron.h b/Sample/HardParticle/FormFactorDodecahedron.h
index 9c80614142d..e092b8dfbaa 100644
--- a/Sample/HardParticle/FormFactorDodecahedron.h
+++ b/Sample/HardParticle/FormFactorDodecahedron.h
@@ -26,16 +26,16 @@ public:
     FormFactorDodecahedron(const std::vector<double> P);
     FormFactorDodecahedron(double edge);
 
-    FormFactorDodecahedron* clone() const override final
+    FormFactorDodecahedron* clone() const final
     {
         return new FormFactorDodecahedron(m_edge);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getEdge() const { return m_edge; }
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorDot.h b/Sample/HardParticle/FormFactorDot.h
index 150933982cd..60b51546d87 100644
--- a/Sample/HardParticle/FormFactorDot.h
+++ b/Sample/HardParticle/FormFactorDot.h
@@ -26,20 +26,20 @@ public:
     FormFactorDot(const std::vector<double> P);
     FormFactorDot(double radius);
 
-    FormFactorDot* clone() const override final { return new FormFactorDot(m_radius); }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    FormFactorDot* clone() const final { return new FormFactorDot(m_radius); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getRadius() const { return m_radius; }
 
-    double radialExtension() const override final { return 0; }
+    double radialExtension() const final { return 0; }
 
-    double bottomZ(const IRotation&) const override final { return 0; }
-    double topZ(const IRotation&) const override final { return 0; }
+    double bottomZ(const IRotation&) const final { return 0; }
+    double topZ(const IRotation&) const final { return 0; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    bool canSliceAnalytically(const IRotation&) const override final { return false; }
+    bool canSliceAnalytically(const IRotation&) const final { return false; }
 
 private:
     const double& m_radius;
diff --git a/Sample/HardParticle/FormFactorEllipsoidalCylinder.h b/Sample/HardParticle/FormFactorEllipsoidalCylinder.h
index 81eb7d0334a..db7117ed8e2 100644
--- a/Sample/HardParticle/FormFactorEllipsoidalCylinder.h
+++ b/Sample/HardParticle/FormFactorEllipsoidalCylinder.h
@@ -26,25 +26,25 @@ public:
     FormFactorEllipsoidalCylinder(const std::vector<double> P);
     FormFactorEllipsoidalCylinder(double radius_x, double radius_y, double height);
 
-    FormFactorEllipsoidalCylinder* clone() const override final
+    FormFactorEllipsoidalCylinder* clone() const final
     {
         return new FormFactorEllipsoidalCylinder(m_radius_x, m_radius_y, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getRadiusX() const { return m_radius_x; }
     double getRadiusY() const { return m_radius_y; }
     double getHeight() const { return m_height; }
 
-    double radialExtension() const override final;
+    double radialExtension() const final;
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_radius_x;
diff --git a/Sample/HardParticle/FormFactorFullSphere.h b/Sample/HardParticle/FormFactorFullSphere.h
index bd72a1a93ab..df6e0c2f426 100644
--- a/Sample/HardParticle/FormFactorFullSphere.h
+++ b/Sample/HardParticle/FormFactorFullSphere.h
@@ -26,29 +26,29 @@ public:
     FormFactorFullSphere(const std::vector<double> P, bool position_at_center = false);
     FormFactorFullSphere(double radius, bool position_at_center = false);
 
-    FormFactorFullSphere* clone() const override final
+    FormFactorFullSphere* clone() const final
     {
         return new FormFactorFullSphere(m_radius, m_position_at_center);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getRadius() const { return m_radius; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    double bottomZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const final;
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    bool canSliceAnalytically(const IRotation&) const override final { return true; }
+    bool canSliceAnalytically(const IRotation&) const final { return true; }
 
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_radius;
diff --git a/Sample/HardParticle/FormFactorFullSpheroid.h b/Sample/HardParticle/FormFactorFullSpheroid.h
index 2708162e26e..c2598ed0590 100644
--- a/Sample/HardParticle/FormFactorFullSpheroid.h
+++ b/Sample/HardParticle/FormFactorFullSpheroid.h
@@ -26,24 +26,24 @@ public:
     FormFactorFullSpheroid(const std::vector<double> P);
     FormFactorFullSpheroid(double radius, double height);
 
-    FormFactorFullSpheroid* clone() const override final
+    FormFactorFullSpheroid* clone() const final
     {
         return new FormFactorFullSpheroid(m_radius, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getRadius() const { return m_radius; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_radius;
diff --git a/Sample/HardParticle/FormFactorHemiEllipsoid.h b/Sample/HardParticle/FormFactorHemiEllipsoid.h
index b4d3a459363..09f2473ff95 100644
--- a/Sample/HardParticle/FormFactorHemiEllipsoid.h
+++ b/Sample/HardParticle/FormFactorHemiEllipsoid.h
@@ -28,22 +28,22 @@ public:
     FormFactorHemiEllipsoid(double radius_x, double radius_y, double height);
     virtual ~FormFactorHemiEllipsoid() {}
 
-    FormFactorHemiEllipsoid* clone() const override final
+    FormFactorHemiEllipsoid* clone() const final
     {
         return new FormFactorHemiEllipsoid(m_radius_x, m_radius_y, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getRadiusX() const { return m_radius_x; }
     double getRadiusY() const { return m_radius_y; }
 
-    double radialExtension() const override final;
+    double radialExtension() const final;
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     complex_t Integrand(double Z) const;
diff --git a/Sample/HardParticle/FormFactorHollowSphere.h b/Sample/HardParticle/FormFactorHollowSphere.h
index 4753f14a2a9..03000cade08 100644
--- a/Sample/HardParticle/FormFactorHollowSphere.h
+++ b/Sample/HardParticle/FormFactorHollowSphere.h
@@ -26,18 +26,18 @@ public:
     FormFactorHollowSphere(const std::vector<double> P);
     FormFactorHollowSphere(double mean, double full_width);
 
-    FormFactorHollowSphere* clone() const override final
+    FormFactorHollowSphere* clone() const final
     {
         return new FormFactorHollowSphere(m_mean, m_full_width);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double radialExtension() const override final { return m_mean; }
+    double radialExtension() const final { return m_mean; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     bool checkParameters() const;
diff --git a/Sample/HardParticle/FormFactorIcosahedron.h b/Sample/HardParticle/FormFactorIcosahedron.h
index e57bed50d08..1e0c40022ce 100644
--- a/Sample/HardParticle/FormFactorIcosahedron.h
+++ b/Sample/HardParticle/FormFactorIcosahedron.h
@@ -26,16 +26,16 @@ public:
     FormFactorIcosahedron(const std::vector<double> P);
     FormFactorIcosahedron(double edge);
 
-    FormFactorIcosahedron* clone() const override final
+    FormFactorIcosahedron* clone() const final
     {
         return new FormFactorIcosahedron(m_edge);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getEdge() const { return m_edge; }
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorLongBoxGauss.h b/Sample/HardParticle/FormFactorLongBoxGauss.h
index 027737994ce..972091a682a 100644
--- a/Sample/HardParticle/FormFactorLongBoxGauss.h
+++ b/Sample/HardParticle/FormFactorLongBoxGauss.h
@@ -26,24 +26,24 @@ public:
     FormFactorLongBoxGauss(const std::vector<double> P);
     FormFactorLongBoxGauss(double length, double width, double height);
 
-    FormFactorLongBoxGauss* clone() const override final
+    FormFactorLongBoxGauss* clone() const final
     {
         return new FormFactorLongBoxGauss(m_length, m_width, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getHeight() const { return m_height; }
     double getWidth() const { return m_width; }
-    double radialExtension() const override final { return m_length / 2.0; }
+    double radialExtension() const final { return m_length / 2.0; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_length;
diff --git a/Sample/HardParticle/FormFactorLongBoxLorentz.h b/Sample/HardParticle/FormFactorLongBoxLorentz.h
index 8534b0ba14a..32cea60893e 100644
--- a/Sample/HardParticle/FormFactorLongBoxLorentz.h
+++ b/Sample/HardParticle/FormFactorLongBoxLorentz.h
@@ -26,25 +26,25 @@ public:
     FormFactorLongBoxLorentz(const std::vector<double> P);
     FormFactorLongBoxLorentz(double length, double width, double height);
 
-    FormFactorLongBoxLorentz* clone() const override final
+    FormFactorLongBoxLorentz* clone() const final
     {
         return new FormFactorLongBoxLorentz(m_length, m_width, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getHeight() const { return m_height; }
     double getWidth() const { return m_width; }
 
-    double radialExtension() const override final { return m_length / 2.0; }
+    double radialExtension() const final { return m_length / 2.0; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_length;
diff --git a/Sample/HardParticle/FormFactorPrism3.h b/Sample/HardParticle/FormFactorPrism3.h
index 466bc6f758f..7d7c1ab0fe6 100644
--- a/Sample/HardParticle/FormFactorPrism3.h
+++ b/Sample/HardParticle/FormFactorPrism3.h
@@ -26,19 +26,19 @@ public:
     FormFactorPrism3(const std::vector<double> P);
     FormFactorPrism3(double base_edge, double height);
 
-    FormFactorPrism3* clone() const override final
+    FormFactorPrism3* clone() const final
     {
         return new FormFactorPrism3(m_base_edge, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getBaseEdge() const { return m_base_edge; }
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
     double height() const final { return m_height; }
 
 private:
diff --git a/Sample/HardParticle/FormFactorPrism6.h b/Sample/HardParticle/FormFactorPrism6.h
index d1df6cdd2aa..3632e0bb10e 100644
--- a/Sample/HardParticle/FormFactorPrism6.h
+++ b/Sample/HardParticle/FormFactorPrism6.h
@@ -26,19 +26,19 @@ public:
     FormFactorPrism6(const std::vector<double> P);
     FormFactorPrism6(double base_edge, double height);
 
-    FormFactorPrism6* clone() const override final
+    FormFactorPrism6* clone() const final
     {
         return new FormFactorPrism6(m_base_edge, m_height);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getBaseEdge() const { return m_base_edge; }
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
     double height() const final { return m_height; }
 
 private:
diff --git a/Sample/HardParticle/FormFactorPyramid.h b/Sample/HardParticle/FormFactorPyramid.h
index eba66280e5d..92529980f5e 100644
--- a/Sample/HardParticle/FormFactorPyramid.h
+++ b/Sample/HardParticle/FormFactorPyramid.h
@@ -26,11 +26,11 @@ public:
     FormFactorPyramid(const std::vector<double> P);
     FormFactorPyramid(double base_edge, double height, double alpha);
 
-    FormFactorPyramid* clone() const override final
+    FormFactorPyramid* clone() const final
     {
         return new FormFactorPyramid(m_base_edge, m_height, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getBaseEdge() const { return m_base_edge; }
@@ -38,9 +38,9 @@ public:
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorSawtoothRipple.h b/Sample/HardParticle/FormFactorSawtoothRipple.h
index cb3138b774c..33b4399ebb9 100644
--- a/Sample/HardParticle/FormFactorSawtoothRipple.h
+++ b/Sample/HardParticle/FormFactorSawtoothRipple.h
@@ -24,11 +24,11 @@ class FormFactorSawtoothRippleBox : public ISawtoothRipple
 public:
     FormFactorSawtoothRippleBox(const std::vector<double> P);
     FormFactorSawtoothRippleBox(double length, double width, double height, double asymmetry);
-    FormFactorSawtoothRippleBox* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorSawtoothRippleBox* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 //! The form factor for a cosine ripple, with Gaussian profile in elongation direction.
@@ -38,11 +38,11 @@ class FormFactorSawtoothRippleGauss : public ISawtoothRipple
 public:
     FormFactorSawtoothRippleGauss(const std::vector<double> P);
     FormFactorSawtoothRippleGauss(double length, double width, double height, double asymmetry);
-    FormFactorSawtoothRippleGauss* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorSawtoothRippleGauss* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 //! The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
@@ -52,11 +52,11 @@ class FormFactorSawtoothRippleLorentz : public ISawtoothRipple
 public:
     FormFactorSawtoothRippleLorentz(const std::vector<double> P);
     FormFactorSawtoothRippleLorentz(double length, double width, double height, double asymmetry);
-    FormFactorSawtoothRippleLorentz* clone() const override final;
-    void accept(INodeVisitor* visitor) const override final;
+    FormFactorSawtoothRippleLorentz* clone() const final;
+    void accept(INodeVisitor* visitor) const final;
 
 private:
-    complex_t factor_x(complex_t qx) const override final;
+    complex_t factor_x(complex_t qx) const final;
 };
 
 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORSAWTOOTHRIPPLE_H
diff --git a/Sample/HardParticle/FormFactorTetrahedron.h b/Sample/HardParticle/FormFactorTetrahedron.h
index b6aae73428c..822aff2218a 100644
--- a/Sample/HardParticle/FormFactorTetrahedron.h
+++ b/Sample/HardParticle/FormFactorTetrahedron.h
@@ -26,11 +26,11 @@ public:
     FormFactorTetrahedron(const std::vector<double> P);
     FormFactorTetrahedron(double base_edge, double height, double alpha);
 
-    FormFactorTetrahedron* clone() const override final
+    FormFactorTetrahedron* clone() const final
     {
         return new FormFactorTetrahedron(m_base_edge, m_height, m_alpha);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getBaseEdge() const { return m_base_edge; }
     double getHeight() const { return m_height; }
@@ -38,9 +38,9 @@ public:
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorTruncatedCube.h b/Sample/HardParticle/FormFactorTruncatedCube.h
index 422a309b8a0..f0acaaecc66 100644
--- a/Sample/HardParticle/FormFactorTruncatedCube.h
+++ b/Sample/HardParticle/FormFactorTruncatedCube.h
@@ -26,17 +26,17 @@ public:
     FormFactorTruncatedCube(const std::vector<double> P);
     FormFactorTruncatedCube(double length, double removed_length);
 
-    FormFactorTruncatedCube* clone() const override final
+    FormFactorTruncatedCube* clone() const final
     {
         return new FormFactorTruncatedCube(m_length, m_removed_length);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getLength() const { return m_length; }
     double getRemovedLength() const { return m_removed_length; }
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     static const PolyhedralTopology topology;
diff --git a/Sample/HardParticle/FormFactorTruncatedSphere.h b/Sample/HardParticle/FormFactorTruncatedSphere.h
index 520dd60b291..b3a375c493a 100644
--- a/Sample/HardParticle/FormFactorTruncatedSphere.h
+++ b/Sample/HardParticle/FormFactorTruncatedSphere.h
@@ -26,25 +26,25 @@ public:
     FormFactorTruncatedSphere(const std::vector<double> P);
     FormFactorTruncatedSphere(double radius, double height, double dh);
 
-    FormFactorTruncatedSphere* clone() const override final
+    FormFactorTruncatedSphere* clone() const final
     {
         return new FormFactorTruncatedSphere(m_radius, m_height, m_dh);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getHeight() const { return m_height; }
     double getRadius() const { return m_radius; }
     double getRemovedTop() const { return m_dh; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     bool check_initialization() const;
diff --git a/Sample/HardParticle/FormFactorTruncatedSpheroid.h b/Sample/HardParticle/FormFactorTruncatedSpheroid.h
index 5f067ed2d13..ffae06204a8 100644
--- a/Sample/HardParticle/FormFactorTruncatedSpheroid.h
+++ b/Sample/HardParticle/FormFactorTruncatedSpheroid.h
@@ -27,26 +27,26 @@ public:
     FormFactorTruncatedSpheroid(const std::vector<double> P);
     FormFactorTruncatedSpheroid(double radius, double height, double height_flattening, double dh);
 
-    FormFactorTruncatedSpheroid* clone() const override final
+    FormFactorTruncatedSpheroid* clone() const final
     {
         return new FormFactorTruncatedSpheroid(m_radius, m_height, m_height_flattening, m_dh);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getRadius() const { return m_radius; }
     double getHeight() const { return m_height; }
     double getHeightFlattening() const { return m_height_flattening; }
     double getRemovedTop() const { return m_dh; }
 
-    double radialExtension() const override final { return m_radius; }
+    double radialExtension() const final { return m_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
-                                 kvector_t translation) const override final;
+                                 kvector_t translation) const final;
 
-    void onChange() override final;
+    void onChange() final;
 
 private:
     bool check_initialization() const;
diff --git a/Sample/HardParticle/IFormFactorPolyhedron.h b/Sample/HardParticle/IFormFactorPolyhedron.h
index 7f6ea8467a5..7aaa460d50a 100644
--- a/Sample/HardParticle/IFormFactorPolyhedron.h
+++ b/Sample/HardParticle/IFormFactorPolyhedron.h
@@ -34,14 +34,14 @@ public:
     IFormFactorPolyhedron(const NodeMeta& meta, const std::vector<double>& PValues);
     ~IFormFactorPolyhedron();
 
-    double bottomZ(const IRotation& rotation) const override final;
-    double topZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
+    double topZ(const IRotation& rotation) const final;
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
     complex_t evaluate_centered(cvector_t q) const;
 
-    double volume() const override final;
-    double radialExtension() const override final;
+    double volume() const final;
+    double radialExtension() const final;
     void assert_platonic() const;
 
 protected:
diff --git a/Sample/HardParticle/IFormFactorPrism.h b/Sample/HardParticle/IFormFactorPrism.h
index 3e41228b471..e3d01082f5d 100644
--- a/Sample/HardParticle/IFormFactorPrism.h
+++ b/Sample/HardParticle/IFormFactorPrism.h
@@ -28,8 +28,8 @@ public:
     IFormFactorPrism(const NodeMeta& meta, const std::vector<double>& PValues);
     ~IFormFactorPrism();
 
-    double bottomZ(const IRotation& rotation) const override final;
-    double topZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
+    double topZ(const IRotation& rotation) const final;
 
     complex_t evaluate_for_q(cvector_t q) const override;
     double volume() const override;
diff --git a/Sample/HardParticle/IProfileRipple.h b/Sample/HardParticle/IProfileRipple.h
index 3c95cc16e5e..d221a9bf010 100644
--- a/Sample/HardParticle/IProfileRipple.h
+++ b/Sample/HardParticle/IProfileRipple.h
@@ -28,9 +28,9 @@ public:
     double getHeight() const { return m_height; }
     double getWidth() const { return m_width; }
 
-    double radialExtension() const override final;
+    double radialExtension() const final;
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
     const double& m_length;
@@ -50,7 +50,7 @@ public:
     IProfileRectangularRipple(const NodeMeta& meta, const std::vector<double>& PValues);
 
 private:
-    virtual void onChange() override final;
+    virtual void onChange() final;
     complex_t factor_yz(complex_t qy, complex_t qz) const final;
 };
 
@@ -62,7 +62,7 @@ public:
     ICosineRipple(const NodeMeta& meta, const std::vector<double>& PValues);
 
 private:
-    virtual void onChange() override final;
+    virtual void onChange() final;
     complex_t factor_yz(complex_t qy, complex_t qz) const final;
 };
 
@@ -79,7 +79,7 @@ protected:
     const double& m_asymmetry;
 
 private:
-    virtual void onChange() override final;
+    virtual void onChange() final;
     complex_t factor_yz(complex_t qy, complex_t qz) const final;
 };
 
diff --git a/Sample/Material/MagneticMaterialImpl.h b/Sample/Material/MagneticMaterialImpl.h
index b7e243fb5c5..6951b143ad8 100644
--- a/Sample/Material/MagneticMaterialImpl.h
+++ b/Sample/Material/MagneticMaterialImpl.h
@@ -37,21 +37,21 @@ public:
     MagneticMaterialImpl* clone() const override = 0;
 
     //! Constructs a material with inverted magnetization
-    MagneticMaterialImpl* inverted() const override final;
+    MagneticMaterialImpl* inverted() const final;
 
     //! Indicates whether the interaction with the material is scalar.
     //! This means that different polarization states will be diffracted equally
-    bool isScalarMaterial() const override final;
+    bool isScalarMaterial() const final;
 
-    bool isMagneticMaterial() const override final;
+    bool isMagneticMaterial() const final;
 
     //! Returns the magnetization (in A/m)
-    kvector_t magnetization() const override final;
+    kvector_t magnetization() const final;
 
     //! Returns (\f$ \pi/\lambda^2 \f$ - sld) matrix with magnetization corrections
-    Eigen::Matrix2cd polarizedSubtrSLD(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd polarizedSubtrSLD(const WavevectorInfo& wavevectors) const final;
 
-    MagneticMaterialImpl* rotatedMaterial(const Transform3D& transform) const override final;
+    MagneticMaterialImpl* rotatedMaterial(const Transform3D& transform) const final;
 
 private:
     void setMagnetization(kvector_t magnetization) { m_magnetization = magnetization; }
diff --git a/Sample/Multilayer/Layer.h b/Sample/Multilayer/Layer.h
index a6bc3448499..7675e2ab5aa 100644
--- a/Sample/Multilayer/Layer.h
+++ b/Sample/Multilayer/Layer.h
@@ -31,21 +31,21 @@ public:
 
     ~Layer() override;
 
-    Layer* clone() const override final;
+    Layer* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     void setThickness(double thickness);
     double thickness() const { return m_thickness; }
 
-    const Material* material() const override final { return &m_material; }
+    const Material* material() const final { return &m_material; }
     void setMaterial(Material material);
 
     void addLayout(const ParticleLayout& decoration);
     size_t numberOfLayouts() const { return m_layouts.size(); }
     std::vector<const ParticleLayout*> layouts() const;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
     void registerThickness(bool make_registered = true);
 
diff --git a/Sample/Multilayer/MultiLayer.h b/Sample/Multilayer/MultiLayer.h
index 5ee701f1f08..b0c991b1de8 100644
--- a/Sample/Multilayer/MultiLayer.h
+++ b/Sample/Multilayer/MultiLayer.h
@@ -46,9 +46,9 @@ public:
 
     //! Returns a clone of multilayer with clones of all layers and
     //! interfaces between layers
-    MultiLayer* clone() const final override;
+    MultiLayer* clone() const final;
 
-    void accept(INodeVisitor* visitor) const final override { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     size_t numberOfLayers() const { return m_layers.size(); }
 
@@ -76,7 +76,7 @@ public:
     //! Returns the external field applied to the multilayer (units: A/m)
     kvector_t externalField() const { return m_ext_field; }
 
-    std::vector<const INode*> getChildren() const final override;
+    std::vector<const INode*> getChildren() const final;
 
     void setRoughnessModel(RoughnessModel roughnessModel);
 
diff --git a/Sample/Particle/Crystal.h b/Sample/Particle/Crystal.h
index 952ec2aa533..6aeb6dbfe2e 100644
--- a/Sample/Particle/Crystal.h
+++ b/Sample/Particle/Crystal.h
@@ -38,9 +38,9 @@ public:
     Crystal(const IParticle& basis, const Lattice3D& lattice, double position_variance = 0);
     ~Crystal();
 
-    Crystal* clone() const override final;
+    Crystal* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     IFormFactor* createTotalFormFactor(const IFormFactor& meso_crystal_form_factor,
                                        const IRotation* p_rotation,
@@ -50,7 +50,7 @@ public:
 
     Lattice3D transformedLattice(const IRotation* p_rotation = nullptr) const;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 private:
     Crystal(IParticle* p_basis, const Lattice3D& lattice, double position_variance = 0);
diff --git a/Sample/Particle/FormFactorCoreShell.h b/Sample/Particle/FormFactorCoreShell.h
index 92de7248acd..18b07aed955 100644
--- a/Sample/Particle/FormFactorCoreShell.h
+++ b/Sample/Particle/FormFactorCoreShell.h
@@ -29,25 +29,25 @@ class FormFactorCoreShell : public IFormFactor
 {
 public:
     FormFactorCoreShell(IFormFactor* core, IFormFactor* shell);
-    ~FormFactorCoreShell() override final;
+    ~FormFactorCoreShell() final;
 
-    FormFactorCoreShell* clone() const override final;
+    FormFactorCoreShell* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double radialExtension() const override final;
+    double radialExtension() const final;
 
-    double bottomZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const final;
 
-    void setAmbientMaterial(const Material& material) override final;
+    void setAmbientMaterial(const Material& material) final;
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const final;
 
 #ifndef SWIG
     //! Calculates and returns a polarized form factor calculation in DWBA
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
 #endif
 
 protected:
diff --git a/Sample/Particle/FormFactorCrystal.h b/Sample/Particle/FormFactorCrystal.h
index 534c26fb7e0..592edc64a7d 100644
--- a/Sample/Particle/FormFactorCrystal.h
+++ b/Sample/Particle/FormFactorCrystal.h
@@ -21,36 +21,36 @@
 //! The form factor of a MesoCrystal.
 //! @ingroup formfactors
 
-class FormFactorCrystal : public IFormFactor
+class FormFactorCrystal final: public IFormFactor
 {
 public:
     FormFactorCrystal(const Lattice3D& lattice, const IFormFactor& basis_form_factor,
                       const IFormFactor& meso_form_factor, double position_variance = 0.0);
-    ~FormFactorCrystal() override final;
+    ~FormFactorCrystal() override;
 
-    FormFactorCrystal* clone() const override final
+    FormFactorCrystal* clone() const override
     {
         return new FormFactorCrystal(m_lattice, *m_basis_form_factor, *m_meso_form_factor,
                                      m_position_variance);
     }
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     void setAmbientMaterial(const Material& material) override
     {
         m_basis_form_factor->setAmbientMaterial(material);
     }
 
-    double volume() const override final { return m_meso_form_factor->volume(); }
-    double radialExtension() const override final { return m_meso_form_factor->radialExtension(); }
+    double volume() const override { return m_meso_form_factor->volume(); }
+    double radialExtension() const override { return m_meso_form_factor->radialExtension(); }
 
     double bottomZ(const IRotation& rotation) const override;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const override;
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const override;
 #ifndef SWIG
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override;
 #endif
 
 private:
diff --git a/Sample/Particle/FormFactorWeighted.h b/Sample/Particle/FormFactorWeighted.h
index f5163c1c3dc..4c7eb054854 100644
--- a/Sample/Particle/FormFactorWeighted.h
+++ b/Sample/Particle/FormFactorWeighted.h
@@ -29,27 +29,27 @@ class FormFactorWeighted : public IFormFactor
 {
 public:
     FormFactorWeighted();
-    ~FormFactorWeighted() override final;
+    ~FormFactorWeighted() final;
 
-    FormFactorWeighted* clone() const override final;
+    FormFactorWeighted* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double radialExtension() const override final;
+    double radialExtension() const final;
 
-    double bottomZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const final;
 
     void addFormFactor(const IFormFactor& form_factor, double weight = 1.0);
 
-    void setAmbientMaterial(const Material& material) override final;
+    void setAmbientMaterial(const Material& material) final;
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const final;
 
 #ifndef SWIG
     //! Calculates and returns a polarized form factor calculation in DWBA
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
 #endif
 
 protected:
diff --git a/Sample/Particle/IParticle.h b/Sample/Particle/IParticle.h
index 4e81e0e9c4b..7a1d016ee0b 100644
--- a/Sample/Particle/IParticle.h
+++ b/Sample/Particle/IParticle.h
@@ -57,7 +57,7 @@ public:
     void setPosition(double x, double y, double z) { m_position = kvector_t(x, y, z); }
 
     //! Translates the particle
-    void translate(kvector_t translation) override final;
+    void translate(kvector_t translation) final;
 
     //! Returns rotation object
     const IRotation* rotation() const;
@@ -66,7 +66,7 @@ public:
     void setRotation(const IRotation& rotation);
 
     //! Rotates the particle
-    void rotate(const IRotation& rotation) override final;
+    void rotate(const IRotation& rotation) final;
 
     std::vector<const INode*> getChildren() const override;
 
diff --git a/Sample/Particle/MesoCrystal.h b/Sample/Particle/MesoCrystal.h
index db70d25d31e..25cb9de9068 100644
--- a/Sample/Particle/MesoCrystal.h
+++ b/Sample/Particle/MesoCrystal.h
@@ -28,13 +28,13 @@ public:
     MesoCrystal(const Crystal& particle_structure, const IFormFactor& form_factor);
 
     ~MesoCrystal();
-    MesoCrystal* clone() const override final;
+    MesoCrystal* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final;
+    void accept(INodeVisitor* visitor) const final;
 
-    SlicedParticle createSlicedParticle(ZLimits limits) const override final;
+    SlicedParticle createSlicedParticle(ZLimits limits) const final;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 private:
     MesoCrystal(Crystal* p_particle_structure, IFormFactor* p_form_factor);
diff --git a/Sample/Particle/Particle.h b/Sample/Particle/Particle.h
index cea13c3a7ed..81939747202 100644
--- a/Sample/Particle/Particle.h
+++ b/Sample/Particle/Particle.h
@@ -30,16 +30,16 @@ public:
     Particle(Material material, const IFormFactor& form_factor);
     Particle(Material material, const IFormFactor& form_factor, const IRotation& rotation);
 
-    Particle* clone() const override final;
+    Particle* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    SlicedParticle createSlicedParticle(ZLimits limits) const override final;
+    SlicedParticle createSlicedParticle(ZLimits limits) const final;
 
     void setMaterial(Material material);
-    const Material* material() const override final { return &m_material; }
+    const Material* material() const final { return &m_material; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 protected:
     Material m_material;
diff --git a/Sample/Particle/ParticleComposition.h b/Sample/Particle/ParticleComposition.h
index abf9a91d515..d0549b61a8b 100644
--- a/Sample/Particle/ParticleComposition.h
+++ b/Sample/Particle/ParticleComposition.h
@@ -28,11 +28,11 @@ public:
     ParticleComposition(const IParticle& particle, std::vector<kvector_t> positions);
 
     ~ParticleComposition();
-    ParticleComposition* clone() const override final;
+    ParticleComposition* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    IFormFactor* createFormFactor() const override final;
+    IFormFactor* createFormFactor() const final;
 
     void addParticle(const IParticle& particle);
     void addParticle(const IParticle& particle, kvector_t position);
@@ -41,11 +41,11 @@ public:
     //! Returns number of different particles
     size_t nbrParticles() const { return m_particles.size(); }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
-    SafePointerVector<IParticle> decompose() const override final;
+    SafePointerVector<IParticle> decompose() const final;
 
-    ParticleLimits bottomTopZ() const override final;
+    ParticleLimits bottomTopZ() const final;
 
 private:
     size_t check_index(size_t index) const;
diff --git a/Sample/Particle/ParticleCoreShell.h b/Sample/Particle/ParticleCoreShell.h
index 056bfee2944..a854bcf0fb5 100644
--- a/Sample/Particle/ParticleCoreShell.h
+++ b/Sample/Particle/ParticleCoreShell.h
@@ -29,17 +29,17 @@ public:
                       kvector_t relative_core_position = kvector_t(0.0, 0.0, 0.0));
     ~ParticleCoreShell();
 
-    ParticleCoreShell* clone() const override final;
+    ParticleCoreShell* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    SlicedParticle createSlicedParticle(ZLimits limits) const override final;
+    SlicedParticle createSlicedParticle(ZLimits limits) const final;
 
     const Particle* coreParticle() const;
 
     const Particle* shellParticle() const;
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
 protected:
     void addAndRegisterCore(const Particle& core, kvector_t relative_core_position);
diff --git a/Sample/Particle/ParticleDistribution.h b/Sample/Particle/ParticleDistribution.h
index 5f06c448683..8bbf7b2a0d0 100644
--- a/Sample/Particle/ParticleDistribution.h
+++ b/Sample/Particle/ParticleDistribution.h
@@ -29,13 +29,13 @@ class ParticleDistribution : public IAbstractParticle
 public:
     ParticleDistribution(const IParticle& prototype, const ParameterDistribution& par_distr);
 
-    ParticleDistribution* clone() const override final;
+    ParticleDistribution* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    void translate(kvector_t translation) override final;
+    void translate(kvector_t translation) final;
 
-    void rotate(const IRotation& rotation) override final;
+    void rotate(const IRotation& rotation) final;
 
     //! Returns list of new particles generated according to a distribution.
     SafePointerVector<IParticle> generateParticles() const;
@@ -46,7 +46,7 @@ public:
     //! Returns the distributed parameter data
     ParameterDistribution parameterDistribution() const { return m_par_distribution; }
 
-    std::vector<const INode*> getChildren() const override final;
+    std::vector<const INode*> getChildren() const final;
 
     std::string mainUnits() const;
 
diff --git a/Sample/Scattering/FormFactorDecoratorMaterial.h b/Sample/Scattering/FormFactorDecoratorMaterial.h
index 6ca332d1610..b0a89c7b8ee 100644
--- a/Sample/Scattering/FormFactorDecoratorMaterial.h
+++ b/Sample/Scattering/FormFactorDecoratorMaterial.h
@@ -23,16 +23,16 @@
 //! refractive index and that of its surrounding material.
 //! @ingroup formfactors_decorations
 
-class FormFactorDecoratorMaterial : public IFormFactorDecorator
+class FormFactorDecoratorMaterial final: public IFormFactorDecorator
 {
 public:
     FormFactorDecoratorMaterial(const IFormFactor& ff);
 
-    ~FormFactorDecoratorMaterial() override final;
+    ~FormFactorDecoratorMaterial() override;
 
-    FormFactorDecoratorMaterial* clone() const override final;
+    FormFactorDecoratorMaterial* clone() const override;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     //! Sets the material of the scatterer
     void setMaterial(const Material& material);
@@ -43,7 +43,7 @@ public:
     complex_t evaluate(const WavevectorInfo& wavevectors) const override;
 #ifndef SWIG
     //! Returns scattering amplitude for matrix interactions
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override;
 #endif
 
 private:
diff --git a/Sample/Scattering/FormFactorDecoratorPositionFactor.h b/Sample/Scattering/FormFactorDecoratorPositionFactor.h
index de61b4cf815..8ac880c9b94 100644
--- a/Sample/Scattering/FormFactorDecoratorPositionFactor.h
+++ b/Sample/Scattering/FormFactorDecoratorPositionFactor.h
@@ -25,20 +25,20 @@ class FormFactorDecoratorPositionFactor : public IFormFactorDecorator
 public:
     FormFactorDecoratorPositionFactor(const IFormFactor& ff, const kvector_t& position);
 
-    FormFactorDecoratorPositionFactor* clone() const override final
+    FormFactorDecoratorPositionFactor* clone() const final
     {
         return new FormFactorDecoratorPositionFactor(*m_ff, m_position);
     }
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double bottomZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const final;
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const final;
 #ifndef SWIG
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
 #endif
 
 private:
diff --git a/Sample/Scattering/FormFactorDecoratorRotation.h b/Sample/Scattering/FormFactorDecoratorRotation.h
index 438b66e35e1..01a6a049edb 100644
--- a/Sample/Scattering/FormFactorDecoratorRotation.h
+++ b/Sample/Scattering/FormFactorDecoratorRotation.h
@@ -29,17 +29,17 @@ public:
     //! Constructor, setting form factor and rotation.
     FormFactorDecoratorRotation(const IFormFactor& ff, const IRotation& rotation);
 
-    FormFactorDecoratorRotation* clone() const override final;
+    FormFactorDecoratorRotation* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double bottomZ(const IRotation& rotation) const override final;
+    double bottomZ(const IRotation& rotation) const final;
 
-    double topZ(const IRotation& rotation) const override final;
+    double topZ(const IRotation& rotation) const final;
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const final;
 #ifndef SWIG
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const override final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
 #endif
 
 private:
diff --git a/Sample/SoftParticle/FormFactorGauss.h b/Sample/SoftParticle/FormFactorGauss.h
index 4a3dba20f5f..5fb9768bd6e 100644
--- a/Sample/SoftParticle/FormFactorGauss.h
+++ b/Sample/SoftParticle/FormFactorGauss.h
@@ -26,20 +26,20 @@ public:
     FormFactorGaussSphere(const std::vector<double> P);
     FormFactorGaussSphere(double mean_radius);
 
-    FormFactorGaussSphere* clone() const override final
+    FormFactorGaussSphere* clone() const final
     {
         return new FormFactorGaussSphere(m_mean_radius);
     }
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
     double getMeanRadius() const { return m_mean_radius; }
 
-    double radialExtension() const override final { return m_mean_radius; }
+    double radialExtension() const final { return m_mean_radius; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    void onChange() override final{};
+    void onChange() final{};
 
 private:
     const double& m_mean_radius;
diff --git a/Sample/SoftParticle/FormFactorSphereGaussianRadius.h b/Sample/SoftParticle/FormFactorSphereGaussianRadius.h
index 60cf9c57afb..9312ba433ba 100644
--- a/Sample/SoftParticle/FormFactorSphereGaussianRadius.h
+++ b/Sample/SoftParticle/FormFactorSphereGaussianRadius.h
@@ -27,19 +27,19 @@ public:
     FormFactorSphereGaussianRadius(const std::vector<double> P);
     FormFactorSphereGaussianRadius(double mean, double sigma);
 
-    FormFactorSphereGaussianRadius* clone() const override final
+    FormFactorSphereGaussianRadius* clone() const final
     {
         return new FormFactorSphereGaussianRadius(m_mean, m_sigma);
     }
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double radialExtension() const override final { return m_mean; }
+    double radialExtension() const final { return m_mean; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     double calculateMeanR3() const;
diff --git a/Sample/SoftParticle/FormFactorSphereLogNormalRadius.h b/Sample/SoftParticle/FormFactorSphereLogNormalRadius.h
index 885875a3464..ad58939dc83 100644
--- a/Sample/SoftParticle/FormFactorSphereLogNormalRadius.h
+++ b/Sample/SoftParticle/FormFactorSphereLogNormalRadius.h
@@ -28,16 +28,16 @@ public:
     FormFactorSphereLogNormalRadius(const std::vector<double> P, size_t n_samples = 0);
     FormFactorSphereLogNormalRadius(double mean, double scale_param, size_t n_samples);
 
-    FormFactorSphereLogNormalRadius* clone() const override final;
+    FormFactorSphereLogNormalRadius* clone() const final;
 
-    void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
+    void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
 
-    double radialExtension() const override final { return m_mean; }
+    double radialExtension() const final { return m_mean; }
 
-    complex_t evaluate_for_q(cvector_t q) const override final;
+    complex_t evaluate_for_q(cvector_t q) const final;
 
 protected:
-    void onChange() override final;
+    void onChange() final;
 
 private:
     const double& m_mean;
-- 
GitLab