From 10bf772e68c1a717d41650b1733d19d01f3ac33e Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 12 Aug 2020 13:26:09 +0200
Subject: [PATCH] IAbstractParticle: add Pargs based c'tor

---
 Core/Particle/IAbstractParticle.cpp | 7 ++++---
 Core/Particle/IAbstractParticle.h   | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Core/Particle/IAbstractParticle.cpp b/Core/Particle/IAbstractParticle.cpp
index 7f3afc36c05..fac41db3e0c 100644
--- a/Core/Particle/IAbstractParticle.cpp
+++ b/Core/Particle/IAbstractParticle.cpp
@@ -14,9 +14,10 @@
 
 #include "Core/Particle/IAbstractParticle.h"
 
-IAbstractParticle::IAbstractParticle() : m_abundance(1.0) {}
-
-IAbstractParticle::~IAbstractParticle() {}
+IAbstractParticle::IAbstractParticle(const NodeMeta& meta, const std::vector<double>& PValues)
+    : ISample(meta, PValues)
+{
+}
 
 void IAbstractParticle::accept(INodeVisitor* visitor) const
 {
diff --git a/Core/Particle/IAbstractParticle.h b/Core/Particle/IAbstractParticle.h
index 63d7dceb398..a0311484aad 100644
--- a/Core/Particle/IAbstractParticle.h
+++ b/Core/Particle/IAbstractParticle.h
@@ -29,8 +29,9 @@ class IRotation;
 class BA_CORE_API_ IAbstractParticle : public ISample
 {
 public:
-    IAbstractParticle();
-    virtual ~IAbstractParticle();
+    IAbstractParticle() = default;
+    IAbstractParticle(const NodeMeta& meta, const std::vector<double>& PValues);
+    virtual ~IAbstractParticle() = default;
 
     virtual IAbstractParticle* clone() const = 0;
 
@@ -50,7 +51,7 @@ public:
     virtual void rotate(const IRotation& rotation) = 0;
 
 protected:
-    double m_abundance;
+    double m_abundance { 1.0 }; // not a Parameter
 };
 
 #endif // BORNAGAIN_CORE_PARTICLE_IABSTRACTPARTICLE_H
-- 
GitLab