diff --git a/Device/Coord/CoordSystem1D.cpp b/Device/Coord/CoordSystem1D.cpp index a61407947df84d3b3ea44c2457592bb8f7ae16cf..971dc29d85d18ed8f4db6b9f4c97517de94ff578 100644 --- a/Device/Coord/CoordSystem1D.cpp +++ b/Device/Coord/CoordSystem1D.cpp @@ -74,7 +74,7 @@ PointwiseAxis* createAxisFrom(const IAxis& axis, Coords coords, const std::strin // class CoordSystem1D // ************************************************************************************************ -CoordSystem1D::CoordSystem1D(const IAxis*&& axis) +CoordSystem1D::CoordSystem1D(const IAxis* axis) : m_axis(axis) { } @@ -199,7 +199,7 @@ std::function<double(double)> AngularReflectometryCoordinates::getTraslatorTo(Co // class WavenumberReflectometryCoordinates // ************************************************************************************************ -WavenumberReflectometryCoordinates::WavenumberReflectometryCoordinates(const IAxis*&& axis) +WavenumberReflectometryCoordinates::WavenumberReflectometryCoordinates(const IAxis* axis) : CoordSystem1D(std::move(axis)) { } diff --git a/Device/Coord/CoordSystem1D.h b/Device/Coord/CoordSystem1D.h index 53c47e3f1a05d131254b854f0a3bc1361c3017af..f954f6aadc92aafdf5804acdf421cda694c56ef1 100644 --- a/Device/Coord/CoordSystem1D.h +++ b/Device/Coord/CoordSystem1D.h @@ -28,7 +28,7 @@ class CoordSystem1D : public ICoordSystem { public: - CoordSystem1D(const IAxis*&& axis); //!< Takes ownership of axis + CoordSystem1D(const IAxis* axis); //!< Takes ownership of axis ~CoordSystem1D() override = default; CoordSystem1D* clone() const override = 0; @@ -94,7 +94,7 @@ private: //! Conversion of axis units for the case of q-defined reflectometry. class WavenumberReflectometryCoordinates : public CoordSystem1D { public: - WavenumberReflectometryCoordinates(const IAxis*&& axis); + WavenumberReflectometryCoordinates(const IAxis* axis); ~WavenumberReflectometryCoordinates() override; WavenumberReflectometryCoordinates* clone() const override; diff --git a/Device/Histo/SimulationResult.cpp b/Device/Histo/SimulationResult.cpp index 116a75cc0cb23b7900f997961a211adae1abdb65..653582ee20a500226033464d82b0dd800abdea44 100644 --- a/Device/Histo/SimulationResult.cpp +++ b/Device/Histo/SimulationResult.cpp @@ -29,7 +29,7 @@ SimulationResult::SimulationResult(const Datafield& data, const ICoordSystem& co checkRank(); } -SimulationResult::SimulationResult(const Datafield& data, const ICoordSystem*&& coords) +SimulationResult::SimulationResult(const Datafield& data, const ICoordSystem* coords) : m_data(data.clone()) , m_coordsys(coords) { diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h index bc12d3f79d73d8b77ba862a1cf69dcc23b07a843..079ef64c778a1ec962b1bf9feb69c0d83a7e1f94 100644 --- a/Device/Histo/SimulationResult.h +++ b/Device/Histo/SimulationResult.h @@ -32,7 +32,7 @@ class SimulationResult { public: SimulationResult(); SimulationResult(const Datafield& data, const ICoordSystem& coords); // TODO rm - SimulationResult(const Datafield& data, const ICoordSystem*&& coords); + SimulationResult(const Datafield& data, const ICoordSystem* coords); ~SimulationResult(); SimulationResult(const SimulationResult& other); diff --git a/Resample/Particle/ReParticle.cpp b/Resample/Particle/ReParticle.cpp index fecad212ece3811dde8a1f0ae246b61d453e6c1a..6e1c78a919a2dee6b5720a608386755648506390 100644 --- a/Resample/Particle/ReParticle.cpp +++ b/Resample/Particle/ReParticle.cpp @@ -33,8 +33,8 @@ ReParticle::ReParticle(const std::optional<size_t>& i_layer, IFormFactor* ff, { } -ReParticle::ReParticle(const IFormFactor& ff, const R3*&& position, const RotMatrix*&& rot) - : ReParticle({}, ff.clone(), nullptr, nullptr, std::move(position), std::move(rot)) +ReParticle::ReParticle(const IFormFactor& ff, const R3* position, const RotMatrix* rot) + : ReParticle({}, ff.clone(), nullptr, nullptr, position, rot) { } diff --git a/Resample/Particle/ReParticle.h b/Resample/Particle/ReParticle.h index 3e291c342310289ac80fdfb5117d60b1c16612ad..60f89bf2cbad886a07ffc34460e5b9a150d49e14 100644 --- a/Resample/Particle/ReParticle.h +++ b/Resample/Particle/ReParticle.h @@ -32,7 +32,7 @@ class Material; class ReParticle : public IReParticle { public: - ReParticle(const IFormFactor& ff, const R3*&& position, const RotMatrix*&& rot); + ReParticle(const IFormFactor& ff, const R3* position, const RotMatrix* rot); ~ReParticle() override; ReParticle* clone() const override; diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index ff1af4fa81436e43b82333895c683452a228a091..f5f2313d37086db9abd64ccd5f48a7e299f42cb8 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -3101,7 +3101,7 @@ class SimulationResult(object): r""" __init__(SimulationResult self) -> SimulationResult __init__(SimulationResult self, Datafield data, ICoordSystem const & coords) -> SimulationResult - __init__(SimulationResult self, Datafield data, ICoordSystem const *&& coords) -> SimulationResult + __init__(SimulationResult self, Datafield data, ICoordSystem const * coords) -> SimulationResult __init__(SimulationResult self, SimulationResult other) -> SimulationResult __init__(SimulationResult self, SimulationResult other) -> SimulationResult """ diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index c1f8b937d2246d6ccfffe2584c66b53f8043112e..1d004526aa7aa2197efedaf97e10c6619c2e2b96 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -3435,52 +3435,51 @@ namespace Swig { #define SWIGTYPE_p_key_type swig_types[46] #define SWIGTYPE_p_long_long swig_types[47] #define SWIGTYPE_p_mapped_type swig_types[48] -#define SWIGTYPE_p_p_ICoordSystem swig_types[49] -#define SWIGTYPE_p_p_PyObject swig_types[50] -#define SWIGTYPE_p_parameters_t swig_types[51] -#define SWIGTYPE_p_second_type swig_types[52] -#define SWIGTYPE_p_short swig_types[53] -#define SWIGTYPE_p_signed_char swig_types[54] -#define SWIGTYPE_p_size_type swig_types[55] -#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[56] -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[57] -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[58] -#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[59] -#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[60] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[61] -#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[62] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[63] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[64] -#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[65] -#define SWIGTYPE_p_std__complexT_double_t swig_types[66] -#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[67] -#define SWIGTYPE_p_std__invalid_argument swig_types[68] -#define SWIGTYPE_p_std__lessT_std__string_t swig_types[69] -#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[70] -#define SWIGTYPE_p_std__pairT_double_double_t swig_types[71] -#define SWIGTYPE_p_std__shared_ptrT_IAxis_t swig_types[72] -#define SWIGTYPE_p_std__vectorT_DiffuseElement_std__allocatorT_DiffuseElement_t_t swig_types[73] -#define SWIGTYPE_p_std__vectorT_IAxis_const_p_std__allocatorT_IAxis_const_p_t_t swig_types[74] -#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[75] -#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[76] -#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[77] -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[78] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[79] -#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[80] -#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[81] -#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[82] -#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[83] -#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[84] -#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[85] -#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[86] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[87] -#define SWIGTYPE_p_unsigned_char swig_types[88] -#define SWIGTYPE_p_unsigned_int swig_types[89] -#define SWIGTYPE_p_unsigned_long_long swig_types[90] -#define SWIGTYPE_p_unsigned_short swig_types[91] -#define SWIGTYPE_p_value_type swig_types[92] -static swig_type_info *swig_types[94]; -static swig_module_info swig_module = {swig_types, 93, 0, 0, 0, 0}; +#define SWIGTYPE_p_p_PyObject swig_types[49] +#define SWIGTYPE_p_parameters_t swig_types[50] +#define SWIGTYPE_p_second_type swig_types[51] +#define SWIGTYPE_p_short swig_types[52] +#define SWIGTYPE_p_signed_char swig_types[53] +#define SWIGTYPE_p_size_type swig_types[54] +#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[55] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[56] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[57] +#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[58] +#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[59] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[60] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[61] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[62] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[63] +#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[64] +#define SWIGTYPE_p_std__complexT_double_t swig_types[65] +#define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[66] +#define SWIGTYPE_p_std__invalid_argument swig_types[67] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[68] +#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[69] +#define SWIGTYPE_p_std__pairT_double_double_t swig_types[70] +#define SWIGTYPE_p_std__shared_ptrT_IAxis_t swig_types[71] +#define SWIGTYPE_p_std__vectorT_DiffuseElement_std__allocatorT_DiffuseElement_t_t swig_types[72] +#define SWIGTYPE_p_std__vectorT_IAxis_const_p_std__allocatorT_IAxis_const_p_t_t swig_types[73] +#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[74] +#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[75] +#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[76] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[77] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[78] +#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[79] +#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[80] +#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[81] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[82] +#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[83] +#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[84] +#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[85] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[86] +#define SWIGTYPE_p_unsigned_char swig_types[87] +#define SWIGTYPE_p_unsigned_int swig_types[88] +#define SWIGTYPE_p_unsigned_long_long swig_types[89] +#define SWIGTYPE_p_unsigned_short swig_types[90] +#define SWIGTYPE_p_value_type swig_types[91] +static swig_type_info *swig_types[93]; +static swig_module_info swig_module = {swig_types, 92, 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) @@ -36514,12 +36513,11 @@ fail: SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Datafield *arg1 = 0 ; - ICoordSystem **arg2 = 0 ; + ICoordSystem *arg2 = (ICoordSystem *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - std::unique_ptr< ICoordSystem * > rvrdeleter2 ; SimulationResult *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; @@ -36531,20 +36529,12 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "Datafield const &""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_p_ICoordSystem, SWIG_POINTER_RELEASE | 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ICoordSystem, 0 | 0 ); if (!SWIG_IsOK(res2)) { - if (res2 == SWIG_ERROR_RELEASE_NOT_OWNED) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', cannot release ownership as memory is not owned for argument " "2"" of type '" "ICoordSystem const *&&""'"); - } else { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *&&""'"); - } + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *""'"); } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *&&""'"); - } - arg2 = reinterpret_cast< ICoordSystem ** >(argp2); - rvrdeleter2.reset(arg2); - result = (SimulationResult *)new SimulationResult((Datafield const &)*arg1,(ICoordSystem const *&&)*arg2); + arg2 = reinterpret_cast< ICoordSystem * >(argp2); + result = (SimulationResult *)new SimulationResult((Datafield const &)*arg1,(ICoordSystem const *)arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36674,7 +36664,7 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_ICoordSystem, SWIG_POINTER_NO_NULL); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ICoordSystem, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SimulationResult__SWIG_2(self, argc, argv); @@ -36687,7 +36677,7 @@ fail: " Possible C/C++ prototypes are:\n" " SimulationResult::SimulationResult()\n" " SimulationResult::SimulationResult(Datafield const &,ICoordSystem const &)\n" - " SimulationResult::SimulationResult(Datafield const &,ICoordSystem const *&&)\n" + " SimulationResult::SimulationResult(Datafield const &,ICoordSystem const *)\n" " SimulationResult::SimulationResult(SimulationResult const &)\n" " SimulationResult::SimulationResult(SimulationResult &&)\n"); return 0; @@ -38600,7 +38590,7 @@ static PyMethodDef SwigMethods[] = { { "new_SimulationResult", _wrap_new_SimulationResult, METH_VARARGS, "\n" "SimulationResult()\n" "SimulationResult(Datafield data, ICoordSystem const & coords)\n" - "SimulationResult(Datafield data, ICoordSystem const *&& coords)\n" + "SimulationResult(Datafield data, ICoordSystem const * coords)\n" "SimulationResult(SimulationResult other)\n" "new_SimulationResult(SimulationResult other) -> SimulationResult\n" ""}, @@ -38788,7 +38778,6 @@ static swig_type_info _swigt__p_iterator = {"_p_iterator", "iterator *", 0, 0, ( static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)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_ICoordSystem = {"_p_p_ICoordSystem", "ICoordSystem **", 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_parameters_t = {"_p_parameters_t", "parameters_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0}; @@ -38883,7 +38872,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_key_type, &_swigt__p_long_long, &_swigt__p_mapped_type, - &_swigt__p_p_ICoordSystem, &_swigt__p_p_PyObject, &_swigt__p_parameters_t, &_swigt__p_second_type, @@ -38978,7 +38966,6 @@ static swig_cast_info _swigc__p_iterator[] = { {&_swigt__p_iterator, 0, 0, 0},{ static swig_cast_info _swigc__p_key_type[] = { {&_swigt__p_key_type, 0, 0, 0},{0, 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_ICoordSystem[] = { {&_swigt__p_p_ICoordSystem, 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_parameters_t[] = { {&_swigt__p_parameters_t, 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}}; @@ -39073,7 +39060,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_key_type, _swigc__p_long_long, _swigc__p_mapped_type, - _swigc__p_p_ICoordSystem, _swigc__p_p_PyObject, _swigc__p_parameters_t, _swigc__p_second_type,