[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 22 10:30:51 UTC 2021
drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx | 2 +-
include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 58418e9a85a007f550d9deb02729fc0c96cc1efd
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 22 09:43:33 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 22 12:30:15 2021 +0200
reduce copying in BufferedDecompositionPrimitive2D
Change-Id: I2393c45c064ea423b7ea1b70e1f16e1a4cea2bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122419
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
index 301d501e6e32..6846a3bcdd26 100644
--- a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
+++ b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
@@ -40,7 +40,7 @@ void BufferedDecompositionPrimitive2D::get2DDecomposition(
Primitive2DContainer aNewSequence;
create2DDecomposition(aNewSequence, rViewInformation);
const_cast<BufferedDecompositionPrimitive2D*>(this)->setBuffered2DDecomposition(
- aNewSequence);
+ std::move(aNewSequence));
}
rVisitor.append(getBuffered2DDecomposition());
diff --git a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
index 66bb9f29af24..c09635c6d60d 100644
--- a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
+++ b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
@@ -79,9 +79,9 @@ protected:
{
return maBuffered2DDecomposition;
}
- void setBuffered2DDecomposition(const Primitive2DContainer& rNew)
+ void setBuffered2DDecomposition(Primitive2DContainer&& rNew)
{
- maBuffered2DDecomposition = rNew;
+ maBuffered2DDecomposition = std::move(rNew);
}
/** method which is to be used to implement the local decomposition of a 2D primitive. */
More information about the Libreoffice-commits
mailing list