diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-21 17:56:29 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-22 08:47:06 +0200 |
commit | 64f03e7bed015ea0626e5218c03078d08257a27f (patch) | |
tree | 1c18f78d1728fb08a0b6c432ca67b04c115f2e27 /include/drawinglayer | |
parent | 0d1490dbbdd6a4cbe2486f993517383cc8112003 (diff) |
Use range ctor to avoid default-insertion of elements before assignment
Change-Id: I9d14ca33349ea92f94362e862fd24e1e468dab05
Reviewed-on: https://gerrit.libreoffice.org/77929
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r-- | include/drawinglayer/primitive2d/baseprimitive2d.hxx | 2 | ||||
-rw-r--r-- | include/drawinglayer/primitive3d/baseprimitive3d.hxx | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index 67a40d77e4c6..5725908fb523 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -79,6 +79,8 @@ namespace drawinglayer { namespace primitive2d { Primitive2DContainer( const Primitive2DContainer&& other ) : deque(other) {} Primitive2DContainer( const std::deque< Primitive2DReference >& other ) : deque(other) {} Primitive2DContainer( std::initializer_list<Primitive2DReference> init ) : deque(init) {} + template <class Iter> + Primitive2DContainer(Iter first, Iter last) : deque(first, last) {} virtual void append(const Primitive2DReference&) override; virtual void append(const Primitive2DContainer& rSource) override; diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx index 4e93523f8e8e..70c9f63ab1af 100644 --- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -62,6 +62,8 @@ namespace drawinglayer { namespace primitive3d { Primitive3DContainer( const Primitive3DContainer& other ) : deque(other) {} Primitive3DContainer( const Primitive3DContainer&& other ) : deque(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; } |