basegfx/source/polygon/b2dpolygon.cxx | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
New commits: commit 5456431aff45c7080ad894f055bcd7513a93a6a6 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Sep 1 09:16:24 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Sep 1 15:19:01 2024 +0200 ImplB2DPolygon could do with a move constructor somewhat surprising coverity did not flag this Change-Id: I52684c6adbf3e051c3ada88fc427078cf0867460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172709 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index dabca6674f8f..5c68036f7644 100644 --- a/basegfx/source/polygon/b2dpolygon.cxx +++ b/basegfx/source/polygon/b2dpolygon.cxx @@ -611,6 +611,8 @@ public: } } + ImplB2DPolygon(ImplB2DPolygon&&) = default; + ImplB2DPolygon(const ImplB2DPolygon& rToBeCopied, sal_uInt32 nIndex, sal_uInt32 nCount) : maPoints(rToBeCopied.maPoints, nIndex, nCount), mbIsClosed(rToBeCopied.mbIsClosed) @@ -625,24 +627,8 @@ public: } } - ImplB2DPolygon& operator=(const ImplB2DPolygon& rOther) - { - if (this != &rOther) - { - moControlVector.reset(); - mpBufferedData.reset(); - maPoints = rOther.maPoints; - mbIsClosed = rOther.mbIsClosed; - if (rOther.moControlVector && rOther.moControlVector->isUsed()) - { - moControlVector.emplace( *rOther.moControlVector ); - if(!moControlVector->isUsed()) - moControlVector.reset(); - } - } - return *this; - } + ImplB2DPolygon& operator=(ImplB2DPolygon&&) = default; sal_uInt32 count() const {