[Libreoffice-commits] core.git: include/drawinglayer sc/inc sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 22 11:20:52 UTC 2019
include/drawinglayer/primitive2d/baseprimitive2d.hxx | 4 ++--
include/drawinglayer/primitive3d/baseprimitive3d.hxx | 4 ++--
sc/inc/rangelst.hxx | 2 +-
sc/source/core/tool/rangelst.cxx | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit fe546ea0c2e2b2cb8ad68a0d4e0955fc3c963c1e
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Aug 22 12:19:08 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Aug 22 13:20:10 2019 +0200
Move ctors/assignments need non-const rvalue reference to actually move
Change-Id: I95fdb807e52ef9e2663a8e291530cfcc3db0d658
Reviewed-on: https://gerrit.libreoffice.org/77947
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 5725908fb523..e7e83d9e06c3 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -76,7 +76,7 @@ namespace drawinglayer { namespace primitive2d {
explicit Primitive2DContainer( size_type count ) : deque(count) {}
virtual ~Primitive2DContainer() override;
Primitive2DContainer( const Primitive2DContainer& other ) : deque(other) {}
- Primitive2DContainer( const Primitive2DContainer&& other ) : deque(other) {}
+ Primitive2DContainer( Primitive2DContainer&& other ) : deque(std::move(other)) {}
Primitive2DContainer( const std::deque< Primitive2DReference >& other ) : deque(other) {}
Primitive2DContainer( std::initializer_list<Primitive2DReference> init ) : deque(init) {}
template <class Iter>
@@ -87,7 +87,7 @@ namespace drawinglayer { namespace primitive2d {
virtual void append(Primitive2DContainer&& rSource) override;
void append(const Primitive2DSequence& rSource);
Primitive2DContainer& operator=(const Primitive2DContainer& r) { deque::operator=(r); return *this; }
- Primitive2DContainer& operator=(const Primitive2DContainer&& r) { deque::operator=(r); return *this; }
+ Primitive2DContainer& operator=(Primitive2DContainer&& r) { deque::operator=(std::move(r)); return *this; }
bool operator==(const Primitive2DContainer& rB) const;
bool operator!=(const Primitive2DContainer& rB) const { return !operator==(rB); }
basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& aViewInformation) const;
diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
index 70c9f63ab1af..8d4f683ef267 100644
--- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -60,14 +60,14 @@ namespace drawinglayer { namespace primitive3d {
explicit Primitive3DContainer() {}
explicit Primitive3DContainer( size_type count ) : deque(count) {}
Primitive3DContainer( const Primitive3DContainer& other ) : deque(other) {}
- Primitive3DContainer( const Primitive3DContainer&& other ) : deque(other) {}
+ Primitive3DContainer( Primitive3DContainer&& other ) : deque(std::move(other)) {}
Primitive3DContainer( std::initializer_list<Primitive3DReference> init ) : deque(init) {}
template <class Iter>
Primitive3DContainer(Iter first, Iter last) : deque(first, last) {}
void append(const Primitive3DContainer& rSource);
Primitive3DContainer& operator=(const Primitive3DContainer& r) { deque::operator=(r); return *this; }
- Primitive3DContainer& operator=(const Primitive3DContainer&& r) { deque::operator=(r); return *this; }
+ Primitive3DContainer& operator=(Primitive3DContainer&& r) { deque::operator=(std::move(r)); return *this; }
bool operator==(const Primitive3DContainer& rB) const;
bool operator!=(const Primitive3DContainer& rB) const { return !operator==(rB); }
basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& aViewInformation) const;
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 4aff9611e885..079e1a646ab5 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -34,7 +34,7 @@ class SAL_WARN_UNUSED SC_DLLPUBLIC ScRangeList final : public SvRefBase
public:
ScRangeList();
ScRangeList( const ScRangeList& rList );
- ScRangeList( const ScRangeList&& rList );
+ ScRangeList( ScRangeList&& rList );
ScRangeList( const ScRange& rRange );
virtual ~ScRangeList() override;
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 4298bb1ea92e..ce5e75bd403c 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -983,9 +983,9 @@ ScRangeList::ScRangeList( const ScRangeList& rList ) :
{
}
-ScRangeList::ScRangeList( const ScRangeList&& rList ) :
+ScRangeList::ScRangeList( ScRangeList&& rList ) :
SvRefBase(),
- maRanges(rList.maRanges),
+ maRanges(std::move(rList.maRanges)),
mnMaxRowUsed(rList.mnMaxRowUsed)
{
}
More information about the Libreoffice-commits
mailing list