From 194010fdc544768224525eed58bcd097d5d6b27d Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Wed, 25 Aug 2021 18:37:57 +0200
Subject: [PATCH] rm prepending "FormFactor"

---
 Sample/Scattering/IFormFactor.cpp | 12 +-----------
 Sample/Scattering/IFormFactor.h   |  3 ---
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/Sample/Scattering/IFormFactor.cpp b/Sample/Scattering/IFormFactor.cpp
index fc32541148a..27acc440d0d 100644
--- a/Sample/Scattering/IFormFactor.cpp
+++ b/Sample/Scattering/IFormFactor.cpp
@@ -70,23 +70,13 @@ Eigen::Matrix2cd IFormFactor::thePolFF(const WavevectorInfo&) const
     throw std::runtime_error("IFormFactor::evaluatePol: is not implemented by default");
 }
 
-std::string IFormFactor::constructorName() const
-{
-    // #bapool + check whether the following should be changed
-    // Some formfactor names (returned by className()) are named in a different way than others: They
-    // are prepended by "FormFactor", the others aren't.
-
-    return (BaseUtils::String::startsWith(m_nodeMeta.className, "FormFactor") ? "" : "FormFactor")
-           + m_nodeMeta.className;
-}
-
 std::string IFormFactor::pythonConstructor() const
 {
     std::vector<std::pair<double, std::string>> arguments;
     for (size_t i = 0; i < m_nodeMeta.paraMeta.size(); i++)
         arguments.push_back({m_P[i], m_nodeMeta.paraMeta[i].unit});
 
-    return Py::Fmt::printFunction(constructorName(), arguments);
+    return Py::Fmt::printFunction(className(), arguments);
 }
 
 double IFormFactor::volume() const
diff --git a/Sample/Scattering/IFormFactor.h b/Sample/Scattering/IFormFactor.h
index 5ae258d23eb..7d87eaee6cf 100644
--- a/Sample/Scattering/IFormFactor.h
+++ b/Sample/Scattering/IFormFactor.h
@@ -82,9 +82,6 @@ protected:
 
     static IFormFactor* createTransformedFormFactor(const IFormFactor& formfactor,
                                                     const IRotation& rot, R3 translation);
-
-private:
-    std::string constructorName() const;
 };
 
 #endif // BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTOR_H
-- 
GitLab