Sheet: modernize C++: use equals default

This commit is contained in:
wmayer
2023-08-22 11:29:02 +02:00
committed by wwmayer
parent 5d585de259
commit 1ac09bccc3
11 changed files with 10 additions and 30 deletions

View File

@@ -39,8 +39,6 @@ public:
initialize("This module is the Spreadsheet module."); // register with Python
}
~Module() override {}
private:
};

View File

@@ -166,9 +166,7 @@ Cell &Cell::operator =(const Cell &rhs)
*
*/
Cell::~Cell()
{
}
Cell::~Cell() = default;
/**
* Set the expression tree to \a expr.

View File

@@ -38,9 +38,7 @@ const int PropertyColumnWidths::defaultHeaderWidth = 50;
TYPESYSTEM_SOURCE(Spreadsheet::PropertyColumnWidths , App::Property)
PropertyColumnWidths::PropertyColumnWidths()
{
}
PropertyColumnWidths::PropertyColumnWidths() = default;
PropertyColumnWidths::PropertyColumnWidths(const PropertyColumnWidths &other)
: Property(), std::map<int, int>(other)

View File

@@ -37,9 +37,7 @@ const int PropertyRowHeights::defaultHeight = 30;
TYPESYSTEM_SOURCE(Spreadsheet::PropertyRowHeights , App::Property)
PropertyRowHeights::PropertyRowHeights()
{
}
PropertyRowHeights::PropertyRowHeights() = default;
PropertyRowHeights::PropertyRowHeights(const PropertyRowHeights &other)
: Property(), std::map<int, int>(other)

View File

@@ -58,8 +58,8 @@ class SpreadsheetExport PropertySpreadsheetQuantity : public App::PropertyQuanti
{
TYPESYSTEM_HEADER_WITH_OVERRIDE();
public:
PropertySpreadsheetQuantity(){}
~PropertySpreadsheetQuantity() override{}
PropertySpreadsheetQuantity() = default;
~PropertySpreadsheetQuantity() override = default;
Property *Copy() const override;
void Paste(const Property &from) override;

View File

@@ -33,7 +33,7 @@ class PropertySheet;
class SheetObserver : public App::DocumentObserver {
public:
SheetObserver(App::Document* document, PropertySheet *_sheet);
~SheetObserver() override { }
~SheetObserver() override = default;
void slotCreatedObject(const App::DocumentObject& Obj) override;
void slotDeletedObject(const App::DocumentObject& Obj) override;
void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) override;

View File

@@ -63,8 +63,6 @@ namespace SpreadsheetGui {
initialize("This module is the SpreadsheetGui module."); // register with Python
}
~Module() override {}
private:
Py::Object open(const Py::Tuple& args)
{

View File

@@ -43,10 +43,7 @@ DlgSettingsImp::DlgSettingsImp( QWidget* parent )
/**
* Destroys the object and frees any allocated resources
*/
DlgSettingsImp::~DlgSettingsImp()
{
// no need to delete child widgets, Qt does it all for us
}
DlgSettingsImp::~DlgSettingsImp() = default;
void DlgSettingsImp::saveSettings()
{

View File

@@ -459,10 +459,7 @@ void SheetTableView::removeColumns()
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
}
SheetTableView::~SheetTableView()
{
}
SheetTableView::~SheetTableView() = default;
void SheetTableView::updateCellSpan()
{

View File

@@ -550,9 +550,7 @@ SheetViewPy::SheetViewPy(SheetView *mdi)
{
}
SheetViewPy::~SheetViewPy()
{
}
SheetViewPy::~SheetViewPy() = default;
Py::Object SheetViewPy::repr()
{

View File

@@ -63,9 +63,7 @@ Workbench::Workbench()
{
}
Workbench::~Workbench()
{
}
Workbench::~Workbench() = default;
void Workbench::activated()
{