diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-02-22 17:11:37 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2022-02-22 17:11:37 +0100 |
| commit | bd830a6f3faae20f9a1b9ca00b045101380a9504 (patch) | |
| tree | c0f50f884dcdf5df4248a7685b554c70528b8c8d | |
| parent | 987afa3c6dc2ec1613609059b81c71c47910e2b0 (diff) | |
| download | PROJ-bd830a6f3faae20f9a1b9ca00b045101380a9504.tar.gz PROJ-bd830a6f3faae20f9a1b9ca00b045101380a9504.zip | |
UnitOfMeasure::operator=(UnitOfMeasure &&): avoid use of moved member (CID 383358)
| -rw-r--r-- | src/iso19111/common.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/iso19111/common.cpp b/src/iso19111/common.cpp index b70845ae..1d7e2030 100644 --- a/src/iso19111/common.cpp +++ b/src/iso19111/common.cpp @@ -120,8 +120,9 @@ 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)); + other.d = nullptr; + BaseObject::operator=(std::move(static_cast<BaseObject &&>(other))); return *this; } //! @endcond |
