diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-07-26 15:17:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-07-27 08:28:46 +0200 |
commit | 6844ef8a7ed9b253b6cca4c8d8aec54ef05d013e (patch) | |
tree | 579c8c9095bf34527ad152cf920e7f37f97abd86 /cppcanvas | |
parent | e6d79e896c540c3e758ebc4b730ca71987c2cee6 (diff) |
cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)
...by explicitly defaulting the copy/move functions (and, where needed in turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc. There appears to be no good reason for
these classes to have a deleted copy assignment op, so just change that to
implicitly-defined, too.
Change-Id: I65fb6ea78a13b7b3d237529613c0489c8cf50614
Reviewed-on: https://gerrit.libreoffice.org/58119
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/wrapper/implbitmapcanvas.hxx | 10 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implcanvas.hxx | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.hxx b/cppcanvas/source/wrapper/implbitmapcanvas.hxx index 6f09794caf99..f2ccaf42153d 100644 --- a/cppcanvas/source/wrapper/implbitmapcanvas.hxx +++ b/cppcanvas/source/wrapper/implbitmapcanvas.hxx @@ -39,16 +39,16 @@ namespace cppcanvas explicit ImplBitmapCanvas( const css::uno::Reference< css::rendering::XBitmapCanvas >& rCanvas ); virtual ~ImplBitmapCanvas() override; + ImplBitmapCanvas(ImplBitmapCanvas const &) = default; + ImplBitmapCanvas(ImplBitmapCanvas &&) = default; + ImplBitmapCanvas & operator =(ImplBitmapCanvas const &) = default; + ImplBitmapCanvas & operator =(ImplBitmapCanvas &&) = default; + virtual ::basegfx::B2ISize getSize() const override; virtual CanvasSharedPtr clone() const override; - // take compiler-provided default copy constructor - //ImplBitmapCanvas(const ImplBitmapCanvas&); - private: - ImplBitmapCanvas& operator=( const ImplBitmapCanvas& ) = delete; - const css::uno::Reference< css::rendering::XBitmapCanvas > mxBitmapCanvas; const css::uno::Reference< css::rendering::XBitmap > mxBitmap; }; diff --git a/cppcanvas/source/wrapper/implcanvas.hxx b/cppcanvas/source/wrapper/implcanvas.hxx index b71f2311f67b..b6f8d02da87c 100644 --- a/cppcanvas/source/wrapper/implcanvas.hxx +++ b/cppcanvas/source/wrapper/implcanvas.hxx @@ -53,6 +53,11 @@ namespace cppcanvas explicit ImplCanvas( const css::uno::Reference< css::rendering::XCanvas >& rCanvas ); virtual ~ImplCanvas() override; + ImplCanvas(ImplCanvas const &) = default; + ImplCanvas(ImplCanvas &&) = default; + ImplCanvas & operator =(ImplCanvas const &) = default; + ImplCanvas & operator =(ImplCanvas &&) = default; + virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix ) override; virtual ::basegfx::B2DHomMatrix getTransformation() const override; @@ -69,12 +74,7 @@ namespace cppcanvas virtual css::rendering::ViewState getViewState() const override; - // take compiler-provided default copy constructor - //ImplCanvas(const ImplCanvas&); - private: - ImplCanvas& operator=( const ImplCanvas& ) = delete; - mutable css::rendering::ViewState maViewState; boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; const css::uno::Reference< css::rendering::XCanvas > mxCanvas; |