diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-07-26 14:02:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-07-27 08:26:45 +0200 |
commit | d2a28ebd5878305b29d8dbfc3b537ddfaabd3625 (patch) | |
tree | 31cf4eead2c179466b5ae3e93b217780b70b3bc1 /vcl | |
parent | 739f746254853dbf6552b0fac9192bfd5ddd0118 (diff) |
vcl: 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.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined counterparts,
but may prevent implicitly declared copy functions from being defined as non-
deleted in the future. (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)
Change-Id: Ife5d8eb699b8b6c84b9229ae275dc386fa189bce
Reviewed-on: https://gerrit.libreoffice.org/58105
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/fontattributes.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/IconThemeScanner.cxx | 3 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 25 | ||||
-rw-r--r-- | vcl/source/font/fontattributes.cxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/keyevent.cxx | 6 |
6 files changed, 0 insertions, 57 deletions
diff --git a/vcl/inc/fontattributes.hxx b/vcl/inc/fontattributes.hxx index 5487ac621668..b5fed601022c 100644 --- a/vcl/inc/fontattributes.hxx +++ b/vcl/inc/fontattributes.hxx @@ -31,7 +31,6 @@ class VCL_DLLPUBLIC FontAttributes { public: explicit FontAttributes(); - FontAttributes( const FontAttributes& ); // device independent font functions const OUString& GetFamilyName() const { return maFamilyName; } diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx index 846eeaa7c942..86cf5112b15b 100644 --- a/vcl/source/app/IconThemeScanner.cxx +++ b/vcl/source/app/IconThemeScanner.cxx @@ -184,9 +184,6 @@ IconThemeScanner::GetStandardIconThemePath() return aPathOptions.GetIconsetPath(); } -IconThemeScanner::~IconThemeScanner() -{} - namespace { class SameTheme diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index a000b065092d..4354ff573bee 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -433,10 +433,6 @@ MouseSettings::MouseSettings() { } -MouseSettings::~MouseSettings() -{ -} - void MouseSettings::CopyData() { // copy if other references exist @@ -715,10 +711,6 @@ StyleSettings::StyleSettings() { } -StyleSettings::~StyleSettings() -{ -} - void StyleSettings::SetFaceColor( const Color& rColor ) { @@ -2346,10 +2338,6 @@ MiscSettings::MiscSettings() { } -MiscSettings::~MiscSettings() -{ -} - bool MiscSettings::operator ==( const MiscSettings& rSet ) const { if ( mxData == rSet.mxData ) @@ -2529,10 +2517,6 @@ HelpSettings::HelpSettings() { } -HelpSettings::~HelpSettings() -{ -} - bool HelpSettings::operator ==( const HelpSettings& rSet ) const { if ( mxData == rSet.mxData ) @@ -2614,15 +2598,6 @@ AllSettings::AllSettings() { } -AllSettings::AllSettings( const AllSettings& rSet ) -{ - mxData = rSet.mxData; -} - -AllSettings::~AllSettings() -{ -} - void AllSettings::CopyData() { // copy if other references exist diff --git a/vcl/source/font/fontattributes.cxx b/vcl/source/font/fontattributes.cxx index 56c28fc21e2a..52dfdc63a376 100644 --- a/vcl/source/font/fontattributes.cxx +++ b/vcl/source/font/fontattributes.cxx @@ -33,20 +33,6 @@ FontAttributes::FontAttributes() mnQuality( 0 ) {} -FontAttributes::FontAttributes( const FontAttributes& rFontAttributes ) : - maFamilyName( rFontAttributes.maFamilyName ), - maStyleName( rFontAttributes.maStyleName ), - meWeight( rFontAttributes.meWeight ), - meFamily( rFontAttributes.meFamily ), - mePitch( rFontAttributes.mePitch ), - meWidthType( rFontAttributes.meWidthType ), - meItalic( rFontAttributes.meItalic ), - meCharSet( rFontAttributes.meCharSet ), - mbSymbolFlag( rFontAttributes.mbSymbolFlag ), - maMapNames( rFontAttributes.maMapNames ), - mnQuality( rFontAttributes.mnQuality ) -{} - bool FontAttributes::CompareDeviceIndependentFontAttributes(const FontAttributes& rOther) const { if (maFamilyName != rOther.maFamilyName) diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index a98d26589c8b..4760cdff6e90 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -102,10 +102,6 @@ PrinterOptions::PrinterOptions() : { } -PrinterOptions::~PrinterOptions() -{ -} - void PrinterOptions::ReadFromConfig( bool i_bFile ) { bool bSuccess = false; @@ -336,10 +332,6 @@ QueueInfo::QueueInfo() mnJobs = 0; } -QueueInfo::QueueInfo( const QueueInfo& ) = default; - -QueueInfo::~QueueInfo() = default; - SalPrinterQueueInfo::SalPrinterQueueInfo() { mnStatus = PrintQueueFlags::NONE; diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx index f0d11065afb2..e4c19c88c8d8 100644 --- a/vcl/source/window/keyevent.cxx +++ b/vcl/source/window/keyevent.cxx @@ -21,12 +21,6 @@ #include <com/sun/star/awt/KeyModifier.hpp> #include <vcl/event.hxx> -KeyEvent::KeyEvent (const KeyEvent& rKeyEvent) : - maKeyCode (rKeyEvent.maKeyCode), - mnRepeat (rKeyEvent.mnRepeat), - mnCharCode(rKeyEvent.mnCharCode) -{} - KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const { KeyEvent aClone(*this); |