From fb3ec53f7c80c4a16405996a66e19a7495f2b541 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 11 Aug 2023 09:24:47 +0200
Subject: [PATCH] OwningVector, Frame: replace *&& by const&

---
 Base/Axis/Frame.cpp                   |  12 +-
 Base/Axis/Frame.h                     |   9 +-
 Base/Types/OwningVector.h             |   2 +-
 auto/Wrap/libBornAgainBase.py         |   8 +-
 auto/Wrap/libBornAgainBase_wrap.cpp   | 179 ++++++++++----------------
 auto/Wrap/libBornAgainDevice_wrap.cpp |   5 +-
 6 files changed, 83 insertions(+), 132 deletions(-)

diff --git a/Base/Axis/Frame.cpp b/Base/Axis/Frame.cpp
index cdfe38b8be6..61755fdb09a 100644
--- a/Base/Axis/Frame.cpp
+++ b/Base/Axis/Frame.cpp
@@ -17,19 +17,19 @@
 #include "Base/Axis/Scale.h"
 #include "Base/Util/Assert.h"
 
-Frame::Frame(std::vector<const Scale*>&& axes)
-    : m_axes(std::move(axes))
+Frame::Frame(const std::vector<const Scale*>& axes)
+    : m_axes(axes)
     , m_size(FrameUtil::product_size(m_axes.reference()))
 {
 }
 
-Frame::Frame(const Scale*&& ax0)
-    : Frame(std::vector<const Scale*>{std::move(ax0)})
+Frame::Frame(const Scale* ax0)
+    : Frame(std::vector<const Scale*>{ax0})
 {
 }
 
-Frame::Frame(const Scale*&& ax0, const Scale*&& ax1)
-    : Frame(std::vector<const Scale*>{std::move(ax0), std::move(ax1)})
+Frame::Frame(const Scale* ax0, const Scale* ax1)
+    : Frame(std::vector<const Scale*>{ax0, ax1})
 {
 }
 
diff --git a/Base/Axis/Frame.h b/Base/Axis/Frame.h
index b2137cb9e38..879b45e0e3e 100644
--- a/Base/Axis/Frame.h
+++ b/Base/Axis/Frame.h
@@ -15,7 +15,6 @@
 #ifndef BORNAGAIN_BASE_AXIS_FRAME_H
 #define BORNAGAIN_BASE_AXIS_FRAME_H
 
-#include "Base/Types/ICloneable.h"
 #include "Base/Types/OwningVector.h"
 #include <string>
 
@@ -25,12 +24,12 @@ class Scale;
 
 //! Holds one or two axes.
 
-class Frame : public ICloneable {
+class Frame {
 public:
     //! Constructor that takes ownership of supplied axes.
-    Frame(std::vector<const Scale*>&& axes);
-    Frame(const Scale*&& ax0);
-    Frame(const Scale*&& ax0, const Scale*&& ax1);
+    Frame(const std::vector<const Scale*>& axes);
+    Frame(const Scale* ax0);
+    Frame(const Scale* ax0, const Scale* ax1);
 
     virtual ~Frame();
 
diff --git a/Base/Types/OwningVector.h b/Base/Types/OwningVector.h
index d9950368fb5..2ef3d660dab 100644
--- a/Base/Types/OwningVector.h
+++ b/Base/Types/OwningVector.h
@@ -31,7 +31,7 @@ class OwningVector {
 public:
     OwningVector() = default;
     //! Constructor that takes over ownership of elements in given vector
-    OwningVector(std::vector<T*>&& v)
+    OwningVector(const std::vector<T*>& v)
     {
         m_v.reserve(v.size());
         for (T* e : v)
diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py
index 988a0ee8675..d78ef674e87 100644
--- a/auto/Wrap/libBornAgainBase.py
+++ b/auto/Wrap/libBornAgainBase.py
@@ -1968,7 +1968,7 @@ def EquiDivision(name, N, start, end):
 def EquiScan(name, N, start, end):
     r"""EquiScan(std::string name, size_t N, double start, double end) -> Scale"""
     return _libBornAgainBase.EquiScan(name, N, start, end)
-class Frame(ICloneable):
+class Frame(object):
     r"""Proxy of C++ Frame class."""
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
@@ -1976,9 +1976,9 @@ class Frame(ICloneable):
 
     def __init__(self, *args):
         r"""
-        __init__(Frame self, std::vector< Scale const *,std::allocator< Scale const * > > && axes) -> Frame
-        __init__(Frame self, Scale const *&& ax0) -> Frame
-        __init__(Frame self, Scale const *&& ax0, Scale const *&& ax1) -> Frame
+        __init__(Frame self, std::vector< Scale const *,std::allocator< Scale const * > > const & axes) -> Frame
+        __init__(Frame self, Scale ax0) -> Frame
+        __init__(Frame self, Scale ax0, Scale ax1) -> Frame
         """
         _libBornAgainBase.Frame_swiginit(self, _libBornAgainBase.new_Frame(*args))
     __swig_destroy__ = _libBornAgainBase.delete_Frame
diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp
index c3847bfa04c..97e537618cf 100644
--- a/auto/Wrap/libBornAgainBase_wrap.cpp
+++ b/auto/Wrap/libBornAgainBase_wrap.cpp
@@ -3406,45 +3406,44 @@ namespace Swig {
 #define SWIGTYPE_p_long_long swig_types[17]
 #define SWIGTYPE_p_mapped_type swig_types[18]
 #define SWIGTYPE_p_p_PyObject swig_types[19]
-#define SWIGTYPE_p_p_Scale swig_types[20]
-#define SWIGTYPE_p_second_type swig_types[21]
-#define SWIGTYPE_p_short swig_types[22]
-#define SWIGTYPE_p_signed_char swig_types[23]
-#define SWIGTYPE_p_size_type swig_types[24]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[25]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[26]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[27]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[28]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[29]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[30]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[31]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[32]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[33]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[34]
-#define SWIGTYPE_p_std__invalid_argument swig_types[35]
-#define SWIGTYPE_p_std__lessT_std__string_t swig_types[36]
-#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[37]
-#define SWIGTYPE_p_std__optionalT_Bin1D_t swig_types[38]
-#define SWIGTYPE_p_std__pairT_double_double_t swig_types[39]
-#define SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t swig_types[40]
-#define SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t swig_types[41]
-#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[42]
-#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[43]
-#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[44]
-#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[45]
-#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[46]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[47]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[48]
-#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[49]
-#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[50]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[51]
-#define SWIGTYPE_p_unsigned_char swig_types[52]
-#define SWIGTYPE_p_unsigned_int swig_types[53]
-#define SWIGTYPE_p_unsigned_long_long swig_types[54]
-#define SWIGTYPE_p_unsigned_short swig_types[55]
-#define SWIGTYPE_p_value_type swig_types[56]
-static swig_type_info *swig_types[58];
-static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0};
+#define SWIGTYPE_p_second_type swig_types[20]
+#define SWIGTYPE_p_short swig_types[21]
+#define SWIGTYPE_p_signed_char swig_types[22]
+#define SWIGTYPE_p_size_type swig_types[23]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[24]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[25]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[26]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[27]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[28]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[29]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[30]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[31]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[32]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[33]
+#define SWIGTYPE_p_std__invalid_argument swig_types[34]
+#define SWIGTYPE_p_std__lessT_std__string_t swig_types[35]
+#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[36]
+#define SWIGTYPE_p_std__optionalT_Bin1D_t swig_types[37]
+#define SWIGTYPE_p_std__pairT_double_double_t swig_types[38]
+#define SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t swig_types[39]
+#define SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t swig_types[40]
+#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[41]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[42]
+#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[43]
+#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[44]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[45]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[46]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[47]
+#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[48]
+#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[49]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[50]
+#define SWIGTYPE_p_unsigned_char swig_types[51]
+#define SWIGTYPE_p_unsigned_int swig_types[52]
+#define SWIGTYPE_p_unsigned_long_long swig_types[53]
+#define SWIGTYPE_p_unsigned_short swig_types[54]
+#define SWIGTYPE_p_value_type swig_types[55]
+static swig_type_info *swig_types[57];
+static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -7020,9 +7019,6 @@ SWIGINTERNINLINE PyObject*
 }
 
 
-#include <memory>
-
-
 
 /* ---------------------------------------------------
  * C++ director class methods
@@ -26982,26 +26978,20 @@ SWIGINTERN PyObject *_wrap_new_Frame__SWIG_0(PyObject *self, Py_ssize_t nobjs, P
   std::vector< Scale const *,std::allocator< Scale const * > > *arg1 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  std::unique_ptr< std::vector< Scale const *,std::allocator< Scale const * > > > rvrdeleter1 ;
   Frame *result = 0 ;
   
   if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t, SWIG_POINTER_RELEASE |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    if (res1 == SWIG_ERROR_RELEASE_NOT_OWNED) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', cannot release ownership as memory is not owned for argument " "1"" of type '" "std::vector< Scale const *,std::allocator< Scale const * > > &&""'");
-    } else {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "std::vector< Scale const *,std::allocator< Scale const * > > &&""'"); 
-    }
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "std::vector< Scale const *,std::allocator< Scale const * > > const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Frame" "', argument " "1"" of type '" "std::vector< Scale const *,std::allocator< Scale const * > > &&""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Frame" "', argument " "1"" of type '" "std::vector< Scale const *,std::allocator< Scale const * > > const &""'"); 
   }
   arg1 = reinterpret_cast< std::vector< Scale const *,std::allocator< Scale const * > > * >(argp1);
-  rvrdeleter1.reset(arg1);
   {
     try {
-      result = (Frame *)new Frame((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1);
+      result = (Frame *)new Frame((std::vector< Scale const *,std::allocator< Scale const * > > const &)*arg1);
     } catch (const std::exception& ex) {
       // message shown in the Python interpreter
       const std::string msg {
@@ -27019,29 +27009,20 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Frame__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  Scale **arg1 = 0 ;
+  Scale *arg1 = (Scale *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  std::unique_ptr< Scale * > rvrdeleter1 ;
   Frame *result = 0 ;
   
   if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_p_Scale, SWIG_POINTER_RELEASE |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Scale, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    if (res1 == SWIG_ERROR_RELEASE_NOT_OWNED) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', cannot release ownership as memory is not owned for argument " "1"" of type '" "Scale const *&&""'");
-    } else {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *&&""'"); 
-    }
-  }
-  if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *&&""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *""'"); 
   }
-  arg1 = reinterpret_cast< Scale ** >(argp1);
-  rvrdeleter1.reset(arg1);
+  arg1 = reinterpret_cast< Scale * >(argp1);
   {
     try {
-      result = (Frame *)new Frame((Scale const *&&)*arg1);
+      result = (Frame *)new Frame((Scale const *)arg1);
     } catch (const std::exception& ex) {
       // message shown in the Python interpreter
       const std::string msg {
@@ -27059,46 +27040,28 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Frame__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  Scale **arg1 = 0 ;
-  Scale **arg2 = 0 ;
+  Scale *arg1 = (Scale *) 0 ;
+  Scale *arg2 = (Scale *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  std::unique_ptr< Scale * > rvrdeleter1 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
-  std::unique_ptr< Scale * > rvrdeleter2 ;
   Frame *result = 0 ;
   
   if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_p_Scale, SWIG_POINTER_RELEASE |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Scale, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    if (res1 == SWIG_ERROR_RELEASE_NOT_OWNED) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', cannot release ownership as memory is not owned for argument " "1"" of type '" "Scale const *&&""'");
-    } else {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *&&""'"); 
-    }
-  }
-  if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *&&""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Frame" "', argument " "1"" of type '" "Scale const *""'"); 
   }
-  arg1 = reinterpret_cast< Scale ** >(argp1);
-  rvrdeleter1.reset(arg1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_p_Scale, SWIG_POINTER_RELEASE |  0 );
+  arg1 = reinterpret_cast< Scale * >(argp1);
+  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Scale, 0 |  0 );
   if (!SWIG_IsOK(res2)) {
-    if (res2 == SWIG_ERROR_RELEASE_NOT_OWNED) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Frame" "', cannot release ownership as memory is not owned for argument " "2"" of type '" "Scale const *&&""'");
-    } else {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Frame" "', argument " "2"" of type '" "Scale const *&&""'"); 
-    }
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Frame" "', argument " "2"" of type '" "Scale const *""'"); 
   }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Frame" "', argument " "2"" of type '" "Scale const *&&""'"); 
-  }
-  arg2 = reinterpret_cast< Scale ** >(argp2);
-  rvrdeleter2.reset(arg2);
+  arg2 = reinterpret_cast< Scale * >(argp2);
   {
     try {
-      result = (Frame *)new Frame((Scale const *&&)*arg1,(Scale const *&&)*arg2);
+      result = (Frame *)new Frame((Scale const *)arg1,(Scale const *)arg2);
     } catch (const std::exception& ex) {
       // message shown in the Python interpreter
       const std::string msg {
@@ -27124,8 +27087,7 @@ SWIGINTERN PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) {
   --argc;
   if (argc == 1) {
     int _v = 0;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t, SWIG_POINTER_NO_NULL);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       return _wrap_new_Frame__SWIG_0(self, argc, argv);
@@ -27134,7 +27096,7 @@ SWIGINTERN PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) {
   if (argc == 1) {
     int _v = 0;
     void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_p_Scale, SWIG_POINTER_NO_NULL);
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Scale, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       return _wrap_new_Frame__SWIG_1(self, argc, argv);
@@ -27143,11 +27105,11 @@ SWIGINTERN PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) {
   if (argc == 2) {
     int _v = 0;
     void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_p_Scale, SWIG_POINTER_NO_NULL);
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Scale, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       void *vptr = 0;
-      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_Scale, SWIG_POINTER_NO_NULL);
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Scale, 0);
       _v = SWIG_CheckState(res);
       if (_v) {
         return _wrap_new_Frame__SWIG_2(self, argc, argv);
@@ -27158,9 +27120,9 @@ SWIGINTERN PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) {
 fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Frame'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    Frame::Frame(std::vector< Scale const *,std::allocator< Scale const * > > &&)\n"
-    "    Frame::Frame(Scale const *&&)\n"
-    "    Frame::Frame(Scale const *&&,Scale const *&&)\n");
+    "    Frame::Frame(std::vector< Scale const *,std::allocator< Scale const * > > const &)\n"
+    "    Frame::Frame(Scale const *)\n"
+    "    Frame::Frame(Scale const *,Scale const *)\n");
   return 0;
 }
 
@@ -30354,9 +30316,9 @@ static PyMethodDef SwigMethods[] = {
 	 { "EquiDivision", _wrap_EquiDivision, METH_VARARGS, "EquiDivision(std::string name, size_t N, double start, double end) -> Scale"},
 	 { "EquiScan", _wrap_EquiScan, METH_VARARGS, "EquiScan(std::string name, size_t N, double start, double end) -> Scale"},
 	 { "new_Frame", _wrap_new_Frame, METH_VARARGS, "\n"
-		"Frame(std::vector< Scale const *,std::allocator< Scale const * > > && axes)\n"
-		"Frame(Scale const *&& ax0)\n"
-		"new_Frame(Scale const *&& ax0, Scale const *&& ax1) -> Frame\n"
+		"Frame(std::vector< Scale const *,std::allocator< Scale const * > > const & axes)\n"
+		"Frame(Scale ax0)\n"
+		"new_Frame(Scale ax0, Scale ax1) -> Frame\n"
 		""},
 	 { "delete_Frame", _wrap_delete_Frame, METH_O, "delete_Frame(Frame self)"},
 	 { "Frame_clone", _wrap_Frame_clone, METH_O, "Frame_clone(Frame self) -> Frame"},
@@ -30439,9 +30401,6 @@ static PyMethodDef SwigMethods[] = {
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
-static void *_p_FrameTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *)  ((Frame *) x));
-}
 static swig_type_info _swigt__p_Bin1D = {"_p_Bin1D", "Bin1D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Coordinate = {"_p_Coordinate", "Coordinate *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Frame = {"_p_Frame", "Frame *", 0, 0, (void*)0, 0};
@@ -30462,7 +30421,6 @@ static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (
 static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|int_fast64_t *|int_least64_t *|intmax_t *|long long *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_p_Scale = {"_p_p_Scale", "Scale **", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0};
@@ -30521,7 +30479,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_long_long,
   &_swigt__p_mapped_type,
   &_swigt__p_p_PyObject,
-  &_swigt__p_p_Scale,
   &_swigt__p_second_type,
   &_swigt__p_short,
   &_swigt__p_signed_char,
@@ -30563,7 +30520,7 @@ static swig_type_info *swig_type_initial[] = {
 static swig_cast_info _swigc__p_Bin1D[] = {  {&_swigt__p_Bin1D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Coordinate[] = {  {&_swigt__p_Coordinate, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Frame[] = {  {&_swigt__p_Frame, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_Frame, _p_FrameTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ICloneable, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Rotation3DT_double_t[] = {  {&_swigt__p_Rotation3DT_double_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Scale[] = {  {&_swigt__p_Scale, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Span[] = {  {&_swigt__p_Span, 0, 0, 0},{0, 0, 0, 0}};
@@ -30580,7 +30537,6 @@ static swig_cast_info _swigc__p_key_type[] = {  {&_swigt__p_key_type, 0, 0, 0},{
 static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_mapped_type[] = {  {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_p_PyObject[] = {  {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_p_Scale[] = {  {&_swigt__p_p_Scale, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_second_type[] = {  {&_swigt__p_second_type, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
@@ -30639,7 +30595,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_long_long,
   _swigc__p_mapped_type,
   _swigc__p_p_PyObject,
-  _swigc__p_p_Scale,
   _swigc__p_second_type,
   _swigc__p_short,
   _swigc__p_signed_char,
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index 088a26b55fb..67dba39458c 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -41283,9 +41283,6 @@ static void *_p_FootprintGaussTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newme
 static void *_p_FootprintSquareTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *) (IFootprint *) ((FootprintSquare *) x));
 }
-static void *_p_FrameTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *)  ((Frame *) x));
-}
 static void *_p_HorizontalLineTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *) (IShape2D *) ((HorizontalLine *) x));
 }
@@ -41579,7 +41576,7 @@ static swig_cast_info _swigc__p_FootprintGauss[] = {  {&_swigt__p_FootprintGauss
 static swig_cast_info _swigc__p_FootprintSquare[] = {  {&_swigt__p_FootprintSquare, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Frame[] = {  {&_swigt__p_Frame, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_HorizontalLine[] = {  {&_swigt__p_HorizontalLine, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_ICloneable, 0, 0},  {&_swigt__p_FlatDetector, _p_FlatDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_ICloneable, 0, 0},  {&_swigt__p_Frame, _p_FrameTo_p_ICloneable, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetector, _p_IDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IFootprint, _p_IFootprintTo_p_ICloneable, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_ICloneable, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_ICloneable, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_ICloneable, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_ICloneable, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_ICloneable, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_ICloneable, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_ICloneable, 0, 0},  {&_swigt__p_FlatDetector, _p_FlatDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_ICloneable, 0, 0},  {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_ICloneable, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetector, _p_IDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IFootprint, _p_IFootprintTo_p_ICloneable, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_ICloneable, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_ICloneable, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_ICloneable, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_ICloneable, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_ICloneable, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_ICloneable, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_ICloneable, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetector[] = {  {&_swigt__p_IDetector, 0, 0, 0},  {&_swigt__p_FlatDetector, _p_FlatDetectorTo_p_IDetector, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_IDetector, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetectorResolution[] = {  {&_swigt__p_IDetectorResolution, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IFootprint[] = {  {&_swigt__p_IFootprint, 0, 0, 0},  {&_swigt__p_FootprintGauss, _p_FootprintGaussTo_p_IFootprint, 0, 0},  {&_swigt__p_FootprintSquare, _p_FootprintSquareTo_p_IFootprint, 0, 0},{0, 0, 0, 0}};
-- 
GitLab