From c54154bdeabf5572ce891e4d24226dfac81db68e Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de>
Date: Fri, 4 Mar 2022 14:18:04 +0100
Subject: [PATCH] delete copy and move constructors of CoordinateSystem

---
 corsika/detail/framework/geometry/CoordinateSystem.inl | 9 ++++-----
 corsika/framework/geometry/CoordinateSystem.hpp        | 6 ++----
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/corsika/detail/framework/geometry/CoordinateSystem.inl b/corsika/detail/framework/geometry/CoordinateSystem.inl
index faa759aa7..12e914ba9 100644
--- a/corsika/detail/framework/geometry/CoordinateSystem.inl
+++ b/corsika/detail/framework/geometry/CoordinateSystem.inl
@@ -75,7 +75,7 @@ namespace corsika {
   inline CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs,
                                               QuantityVector<length_d> const& vector) {
     EigenTransform const translation{EigenTranslation(vector.getEigenVector())};
-    return std::make_shared<CoordinateSystem const>(CoordinateSystem(cs, translation));
+    return CoordinateSystemPtr{new CoordinateSystem(cs, translation)};
   }
 
   template <typename TDim>
@@ -105,8 +105,7 @@ namespace corsika {
           0, 0, (a1 * a1 + a2 * a2) * c;  // .
     }
 
-    return std::make_shared<CoordinateSystem const>(
-        CoordinateSystem(cs, EigenTransform(A + B)));
+    return CoordinateSystemPtr{new CoordinateSystem{cs, EigenTransform{A + B}}};
   }
 
   template <typename TDim>
@@ -120,7 +119,7 @@ namespace corsika {
     EigenTransform const rotation{
         Eigen::AngleAxisd(angle, axis.getEigenVector().normalized())};
 
-    return std::make_shared<CoordinateSystem const>(CoordinateSystem(cs, rotation));
+    return CoordinateSystemPtr{new CoordinateSystem{cs, rotation}};
   }
 
   template <typename TDim>
@@ -135,7 +134,7 @@ namespace corsika {
         Eigen::AngleAxisd(angle, axis.getEigenVector().normalized()) *
         EigenTranslation(translation.getEigenVector())};
 
-    return std::make_shared<CoordinateSystem const>(CoordinateSystem(cs, transf));
+    return CoordinateSystemPtr{new CoordinateSystem{cs, transf}};
   }
 
 } // namespace corsika
diff --git a/corsika/framework/geometry/CoordinateSystem.hpp b/corsika/framework/geometry/CoordinateSystem.hpp
index f15b89e99..13a8461ca 100644
--- a/corsika/framework/geometry/CoordinateSystem.hpp
+++ b/corsika/framework/geometry/CoordinateSystem.hpp
@@ -109,8 +109,8 @@ namespace corsika {
 
   public:
     // default resource allocation
-    CoordinateSystem(CoordinateSystem const&) = default;
-    CoordinateSystem(CoordinateSystem&&) = default;
+    CoordinateSystem(CoordinateSystem const&) = delete;
+    CoordinateSystem(CoordinateSystem&&) = delete;
     CoordinateSystem& operator=(CoordinateSystem const& pCS) =
         delete; // avoid making copies
     ~CoordinateSystem() = default;
@@ -128,8 +128,6 @@ namespace corsika {
     bool operator!=(CoordinateSystem const&) const;
 
   protected:
-    static CoordinateSystem createCS() { return CoordinateSystem(); }
-
     /**
      * \name Friends
      * Manipulation and creation functions.
-- 
GitLab