From 63b6fe2b9986605a958f33e4109e990809c4c424 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 21 Sep 2022 14:05:43 +0200 Subject: [PATCH 1/5] Beam: rm copy operator --- Device/Beam/Beam.cpp | 17 ----------------- Device/Beam/Beam.h | 1 - 2 files changed, 18 deletions(-) diff --git a/Device/Beam/Beam.cpp b/Device/Beam/Beam.cpp index 2618de0965..a7ed2a4b06 100644 --- a/Device/Beam/Beam.cpp +++ b/Device/Beam/Beam.cpp @@ -42,23 +42,6 @@ Beam::Beam(const Beam& other) m_shape_factor.reset(other.m_shape_factor->clone()); } -Beam& Beam::operator=(const Beam& other) -{ - if (&other == this) - return *this; - m_intensity = other.m_intensity; - m_wavelength = other.m_wavelength; - // m_direction = other.m_direction; - m_alpha = other.m_alpha; - m_phi = other.m_phi; - m_beamPolarization = other.m_beamPolarization; - if (other.m_shape_factor) - m_shape_factor.reset(other.m_shape_factor->clone()); - else - m_shape_factor.release(); - return *this; -} - Beam::~Beam() = default; Beam* Beam::clone() const diff --git a/Device/Beam/Beam.h b/Device/Beam/Beam.h index 1a71fbccc7..3e07ad28ad 100644 --- a/Device/Beam/Beam.h +++ b/Device/Beam/Beam.h @@ -28,7 +28,6 @@ class Beam : public INode { public: Beam(double intensity, double wavelength, const Direction& direction); Beam(const Beam& other); - Beam& operator=(const Beam& other); ~Beam() override; Beam* clone() const; -- GitLab From 11f8475a1d0ed5d055956d34902703d2dccb697e Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 21 Sep 2022 14:07:35 +0200 Subject: [PATCH 2/5] DetectorMask: rm copy operator --- Device/Mask/DetectorMask.cpp | 10 ---------- Device/Mask/DetectorMask.h | 1 - 2 files changed, 11 deletions(-) diff --git a/Device/Mask/DetectorMask.cpp b/Device/Mask/DetectorMask.cpp index 8dcb6debe6..2c6cc2e82f 100644 --- a/Device/Mask/DetectorMask.cpp +++ b/Device/Mask/DetectorMask.cpp @@ -50,16 +50,6 @@ DetectorMask::DetectorMask(const DetectorMask& other) { } -DetectorMask& DetectorMask::operator=(const DetectorMask& other) -{ - if (this != &other) { - m_stack = other.m_stack; - m_masked = other.m_masked; - m_number_of_masked_channels = other.m_number_of_masked_channels; - } - return *this; -} - void DetectorMask::addMask(const IShape2D& shape, bool mask_value) { m_stack.emplace_back(new MaskPattern(shape.clone(), mask_value)); diff --git a/Device/Mask/DetectorMask.h b/Device/Mask/DetectorMask.h index 4ee51de2e3..51f7013c7e 100644 --- a/Device/Mask/DetectorMask.h +++ b/Device/Mask/DetectorMask.h @@ -44,7 +44,6 @@ public: DetectorMask(const IAxis& xAxis, const IAxis& yAxis); ~DetectorMask(); DetectorMask(const DetectorMask& other); - DetectorMask& operator=(const DetectorMask& other); //! Add mask to the stack of detector masks. //! The value "true" means that the area will be excluded from the analysis. -- GitLab From 2800197f21707f1f59ea3618078c479f28b77699 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 21 Sep 2022 14:53:54 +0200 Subject: [PATCH 3/5] SimulationResult: rm copy operator --- Device/Histo/SimulationResult.cpp | 9 --------- Device/Histo/SimulationResult.h | 1 - 2 files changed, 10 deletions(-) diff --git a/Device/Histo/SimulationResult.cpp b/Device/Histo/SimulationResult.cpp index 244442f0d8..116a75cc0c 100644 --- a/Device/Histo/SimulationResult.cpp +++ b/Device/Histo/SimulationResult.cpp @@ -50,15 +50,6 @@ SimulationResult::SimulationResult(SimulationResult&& other) { } -SimulationResult& SimulationResult::operator=(const SimulationResult& other) -{ - if (&other == this) - return *this; - m_data.reset(other.m_data->clone()); - m_coordsys.reset(other.m_coordsys->clone()); - return *this; -} - SimulationResult& SimulationResult::operator=(SimulationResult&& other) { m_data = std::move(other.m_data); diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h index 6d6e434c4e..bc12d3f79d 100644 --- a/Device/Histo/SimulationResult.h +++ b/Device/Histo/SimulationResult.h @@ -38,7 +38,6 @@ public: SimulationResult(const SimulationResult& other); SimulationResult(SimulationResult&& other); - SimulationResult& operator=(const SimulationResult& other); SimulationResult& operator=(SimulationResult&& other); std::vector flatVector(Coords units = Coords::UNDEFINED) const; -- GitLab From 0e4cb07396e1a2f6960a00817232d7633a86b9d1 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 21 Sep 2022 15:28:40 +0200 Subject: [PATCH 4/5] UNUSED notes --- Param/Node/INode.h | 2 +- Resample/Slice/ZLimits.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Param/Node/INode.h b/Param/Node/INode.h index fef0e3244f..5cd824a129 100644 --- a/Param/Node/INode.h +++ b/Param/Node/INode.h @@ -49,7 +49,7 @@ public: //! Returns all children. virtual std::vector nodeChildren() const; - //! Returns all descendants. + //! Returns all descendants. // TODO sep22: rm if it remains UNUSED std::vector nodeOffspring() const; static void requestGt0(std::vector& errs, const double& val, diff --git a/Resample/Slice/ZLimits.cpp b/Resample/Slice/ZLimits.cpp index eeece937db..b99e18eb72 100644 --- a/Resample/Slice/ZLimits.cpp +++ b/Resample/Slice/ZLimits.cpp @@ -34,6 +34,8 @@ bool ZLimits::isFinite() const return !std::isinf(m_zmin) && !std::isinf(m_zmax); } +// TODO sep22: rm all the following if they remain UNUSED + ZLimits ZLimits::enclosingInterval(const ZLimits& left, const ZLimits& right) { return {std::min(left.zBottom(), right.zBottom()), std::max(left.zTop(), right.zTop())}; -- GitLab From 99f0be2f19abdd6de92ad2cefac61596507975b0 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 21 Sep 2022 18:58:12 +0200 Subject: [PATCH 5/5] regenerate --- auto/Wrap/doxygenParam.i | 15 ++++++++++++++- auto/Wrap/libBornAgainParam.py | 2 +- auto/Wrap/libBornAgainParam_wrap.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/auto/Wrap/doxygenParam.i b/auto/Wrap/doxygenParam.i index f64da0e9c2..8c41b0c548 100644 --- a/auto/Wrap/doxygenParam.i +++ b/auto/Wrap/doxygenParam.i @@ -505,7 +505,7 @@ Returns all children. %feature("docstring") INode::nodeOffspring "std::vector< const INode * > INode::nodeOffspring() const INode::nodeOffspring -Returns all descendants. +Returns all descendants. // TODO sep22: rm if it remains UNUSED. "; %feature("docstring") INode::jointError "std::string INode::jointError(const std::vector< std::string > errs) const @@ -658,6 +658,16 @@ C++ includes: ParameterSample.h ParameterSample::ParameterSample"; +// File: classPDouble.xml +%feature("docstring") PDouble ""; + +%feature("docstring") PDouble::PDouble "PDouble::PDouble(double val) +PDouble::PDouble"; + +%feature("docstring") PDouble::PDouble "PDouble::PDouble(double *ptr) +PDouble::PDouble"; + + // File: classRangedDistributionCosine.xml %feature("docstring") RangedDistributionCosine " @@ -866,6 +876,9 @@ NodeUtils::AllDescendantsOfType"; // File: NodeUtils_8h.xml +// File: PDouble_8h.xml + + // File: dir_dabc42ad3745509abd3a496944bb880e.xml diff --git a/auto/Wrap/libBornAgainParam.py b/auto/Wrap/libBornAgainParam.py index 6b9d0f6710..4f83de4d3b 100644 --- a/auto/Wrap/libBornAgainParam.py +++ b/auto/Wrap/libBornAgainParam.py @@ -2108,7 +2108,7 @@ class INode(object): nodeOffspring(INode self) -> swig_dummy_type_const_inode_vector std::vector< const INode * > INode::nodeOffspring() const INode::nodeOffspring - Returns all descendants. + Returns all descendants. // TODO sep22: rm if it remains UNUSED. """ return _libBornAgainParam.INode_nodeOffspring(self) diff --git a/auto/Wrap/libBornAgainParam_wrap.cpp b/auto/Wrap/libBornAgainParam_wrap.cpp index 78d8cbc248..af1b476588 100644 --- a/auto/Wrap/libBornAgainParam_wrap.cpp +++ b/auto/Wrap/libBornAgainParam_wrap.cpp @@ -34992,7 +34992,7 @@ static PyMethodDef SwigMethods[] = { "INode_nodeOffspring(INode self) -> swig_dummy_type_const_inode_vector\n" "std::vector< const INode * > INode::nodeOffspring() const\n" "INode::nodeOffspring\n" - "Returns all descendants. \n" + "Returns all descendants. // TODO sep22: rm if it remains UNUSED. \n" "\n" ""}, { "INode_requestGt0", _wrap_INode_requestGt0, METH_VARARGS, "INode_requestGt0(vector_string_t errs, double const & val, std::string const & name)"}, -- GitLab