summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-08-22 12:19:08 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-08-22 13:20:10 +0200
commitfe546ea0c2e2b2cb8ad68a0d4e0955fc3c963c1e (patch)
treea585a06723db512c4315fbc46a5b2fdb686f9257
parentfe3d97b94b7ec9f366bf13ac40633284f354a5b3 (diff)
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@collabora.com>
-rw-r--r--include/drawinglayer/primitive2d/baseprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive3d/baseprimitive3d.hxx4
-rw-r--r--sc/inc/rangelst.hxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx4
4 files changed, 7 insertions, 7 deletions
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)
{
}