From 6844ef8a7ed9b253b6cca4c8d8aec54ef05d013e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 26 Jul 2018 15:17:19 +0200 Subject: 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 --- cppcanvas/source/wrapper/implbitmapcanvas.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cppcanvas/source/wrapper/implbitmapcanvas.hxx') 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; }; -- cgit