diff options
| -rw-r--r-- | include/proj/util.hpp | 1 | ||||
| -rw-r--r-- | src/iso19111/common.cpp | 1 | ||||
| -rw-r--r-- | src/iso19111/util.cpp | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/include/proj/util.hpp b/include/proj/util.hpp index 78115aa1..acc793cc 100644 --- a/include/proj/util.hpp +++ b/include/proj/util.hpp @@ -331,6 +331,7 @@ class PROJ_GCC_DLL BaseObject { protected: PROJ_INTERNAL BaseObject(); PROJ_INTERNAL void assignSelf(const BaseObjectNNPtr &self); + PROJ_INTERNAL BaseObject &operator=(BaseObject &&other); private: PROJ_OPAQUE_PRIVATE_DATA diff --git a/src/iso19111/common.cpp b/src/iso19111/common.cpp index 7a0d122d..b70845ae 100644 --- a/src/iso19111/common.cpp +++ b/src/iso19111/common.cpp @@ -120,6 +120,7 @@ UnitOfMeasure &UnitOfMeasure::operator=(const UnitOfMeasure &other) { //! @cond Doxygen_Suppress UnitOfMeasure &UnitOfMeasure::operator=(UnitOfMeasure &&other) { + BaseObject::operator=(std::move(static_cast<BaseObject &&>(other))); *d = std::move(*(other.d)); return *this; } diff --git a/src/iso19111/util.cpp b/src/iso19111/util.cpp index 21d45e44..7b69f4aa 100644 --- a/src/iso19111/util.cpp +++ b/src/iso19111/util.cpp @@ -81,6 +81,17 @@ BaseObjectNNPtr::~BaseObjectNNPtr() = default; // --------------------------------------------------------------------------- +//! @cond Doxygen_Suppress +// cppcheck-suppress operatorEqVarError +BaseObject &BaseObject::operator=(BaseObject &&) { + d->self_.reset(); + return *this; +} + +//! @endcond + +// --------------------------------------------------------------------------- + /** Keep a reference to ourselves as an internal weak pointer. So that * extractGeographicBaseObject() can later return a shared pointer on itself. */ |
