From baf3b9fb10fd7f9feda56e12fbfc5467e4945d58 Mon Sep 17 00:00:00 2001
From: Walter Van Herck <w.van.herck@fz-juelich.de>
Date: Wed, 14 Sep 2016 14:51:59 +0200
Subject: [PATCH] Make FormFactorWeighted final

---
 .../IFormFactorDecorator.h                    |  7 +++---
 Core/Multilayer/FormFactorDWBAPol.h           |  1 +
 Core/Particle/FormFactorWeighted.h            | 23 ++++++++++---------
 Core/Scattering/IFormFactorBorn.h             |  1 +
 4 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/Core/DecoratedFormFactor/IFormFactorDecorator.h b/Core/DecoratedFormFactor/IFormFactorDecorator.h
index 3328d5ccdfc..56001a7fc82 100644
--- a/Core/DecoratedFormFactor/IFormFactorDecorator.h
+++ b/Core/DecoratedFormFactor/IFormFactorDecorator.h
@@ -29,14 +29,13 @@
 class BA_CORE_API_ IFormFactorDecorator : public IFormFactor
 {
 public:
-    IFormFactorDecorator() =delete;
     IFormFactorDecorator(const IFormFactor& form_factor) : mp_form_factor(form_factor.clone()) {}
     virtual ~IFormFactorDecorator() { delete mp_form_factor; }
-    virtual IFormFactorDecorator* clone() const =0;
-    virtual void accept(ISampleVisitor* visitor) const =0;
+    virtual IFormFactorDecorator* clone() const=0;
+    virtual void accept(ISampleVisitor* visitor) const=0;
 
     virtual void setAmbientMaterial(const IMaterial &material) {
-        mp_form_factor->setAmbientMaterial(material);  }
+        mp_form_factor->setAmbientMaterial(material); }
 
     virtual double getVolume() const {
         return mp_form_factor->getVolume(); }
diff --git a/Core/Multilayer/FormFactorDWBAPol.h b/Core/Multilayer/FormFactorDWBAPol.h
index 064ffd97c14..389959eed47 100644
--- a/Core/Multilayer/FormFactorDWBAPol.h
+++ b/Core/Multilayer/FormFactorDWBAPol.h
@@ -21,6 +21,7 @@
 class ILayerRTCoefficients;
 
 //! Evaluates the coherent sum of the 16 matrix DWBA terms in a polarized IFormFactor.
+
 //! @ingroup formfactors_internal
 
 class FormFactorDWBAPol final : public IFormFactor
diff --git a/Core/Particle/FormFactorWeighted.h b/Core/Particle/FormFactorWeighted.h
index 5d895191e5b..577cac7fc4f 100644
--- a/Core/Particle/FormFactorWeighted.h
+++ b/Core/Particle/FormFactorWeighted.h
@@ -18,34 +18,35 @@
 
 #include "IFormFactor.h"
 
-//! Coherent sum of different scalar IFormFactor's with different weights, at the same position.
+//! Coherent sum of different scalar IFormFactor's with different weights.
 //!
 //! Used by ParticleComposition and ParticleCoreShell.
-//! If particles are at different positions, then consider FormFactorDecoratorMultiPositionFactor
-//! (restore from commit 0500a26de76).
+//! If same particles are at different positions, then consider
+//! FormFactorDecoratorMultiPositionFactor (restore from commit 0500a26de76).
+
 //! @ingroup formfactors_internal
 
-class BA_CORE_API_ FormFactorWeighted : public IFormFactor
+class BA_CORE_API_ FormFactorWeighted final : public IFormFactor
 {
 public:
     FormFactorWeighted();
-    ~FormFactorWeighted() final;
+    ~FormFactorWeighted();
 
-    FormFactorWeighted* clone() const final;
+    FormFactorWeighted* clone() const;
 
-    void accept(ISampleVisitor* visitor) const final { visitor->visit(this); }
+    void accept(ISampleVisitor* visitor) const { visitor->visit(this); }
 
-    double getRadialExtension() const final;
+    double getRadialExtension() const;
 
     void addFormFactor(const IFormFactor& form_factor, double weight=1.0);
 
-    void setAmbientMaterial(const IMaterial& material) final;
+    void setAmbientMaterial(const IMaterial& material);
 
-    complex_t evaluate(const WavevectorInfo& wavevectors) const final;
+    complex_t evaluate(const WavevectorInfo& wavevectors) const;
 
 #ifndef SWIG
     //! Calculates and returns a polarized form factor calculation in DWBA
-    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
+    Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const;
 #endif
 
 protected:
diff --git a/Core/Scattering/IFormFactorBorn.h b/Core/Scattering/IFormFactorBorn.h
index 0c71c3c651a..9855a38439d 100644
--- a/Core/Scattering/IFormFactorBorn.h
+++ b/Core/Scattering/IFormFactorBorn.h
@@ -20,6 +20,7 @@
 #include "Vectors3D.h"
 
 //! Pure virtual base class for Born form factors.
+//!
 //! In contrast to the generic IFormFactor, a Born form factor does not depend
 //! on the incoming and outgoing wave vectors ki and kf, except through their
 //! difference, the scattering vector q=ki-kf.
-- 
GitLab