diff --git a/apps/esmtool/record.hpp b/apps/esmtool/record.hpp index 57f80e5571..eab133b6b3 100644 --- a/apps/esmtool/record.hpp +++ b/apps/esmtool/record.hpp @@ -34,7 +34,7 @@ namespace EsmTool { } - virtual ~RecordBase() {} + virtual ~RecordBase() = default; virtual std::string getId() const = 0; diff --git a/apps/essimporter/converter.hpp b/apps/essimporter/converter.hpp index 1db278c750..001305f362 100644 --- a/apps/essimporter/converter.hpp +++ b/apps/essimporter/converter.hpp @@ -56,7 +56,7 @@ namespace ESSImport /// @return the order for writing this converter's records to the output file, in relation to other converters virtual int getStage() { return 1; } - virtual ~Converter() {} + virtual ~Converter() = default; void setContext(Context& context) { mContext = &context; } diff --git a/apps/launcher/utils/textinputdialog.cpp b/apps/launcher/utils/textinputdialog.cpp index 4510980f5f..9e06e6a6cd 100644 --- a/apps/launcher/utils/textinputdialog.cpp +++ b/apps/launcher/utils/textinputdialog.cpp @@ -43,8 +43,6 @@ Launcher::TextInputDialog::TextInputDialog(const QString& title, const QString& connect(mButtonBox, &QDialogButtonBox::rejected, this, &TextInputDialog::reject); } -Launcher::TextInputDialog::~TextInputDialog() {} - int Launcher::TextInputDialog::exec() { mLineEdit->clear(); diff --git a/apps/launcher/utils/textinputdialog.hpp b/apps/launcher/utils/textinputdialog.hpp index bba79cdee4..333f4b6579 100644 --- a/apps/launcher/utils/textinputdialog.hpp +++ b/apps/launcher/utils/textinputdialog.hpp @@ -15,7 +15,7 @@ namespace Launcher public: explicit TextInputDialog(const QString& title, const QString& text, QWidget* parent = nullptr); - ~TextInputDialog() override; + ~TextInputDialog() override = default; inline LineEdit* lineEdit() { return mLineEdit; } void setOkButtonEnabled(bool enabled); diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 00a0c4ead7..83f8cea168 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -9,7 +9,7 @@ opencs_units (model/doc ) opencs_units (model/doc - stage savingstate savingstages blacklist messages + savingstate savingstages blacklist messages ) opencs_hdrs (model/doc @@ -25,7 +25,7 @@ opencs_units (model/world opencs_units (model/world universalid record commands columnbase columnimp scriptcontext cell refidcollection - refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager scope + refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager scope pathgrid landtexture land nestedtablewrapper nestedcollection nestedcoladapterimp nestedinfocollection idcompletionmanager metadata defaultgmsts infoselectwrapper commandmacro ) @@ -124,7 +124,7 @@ opencs_units (model/prefs ) opencs_units (model/filter - node unarynode narynode leafnode booleannode parser andnode ornode notnode textnode valuenode + unarynode narynode leafnode booleannode parser andnode ornode notnode textnode valuenode ) opencs_units (view/filter diff --git a/apps/opencs/model/doc/document.cpp b/apps/opencs/model/doc/document.cpp index b4b7290f49..41ff885649 100644 --- a/apps/opencs/model/doc/document.cpp +++ b/apps/opencs/model/doc/document.cpp @@ -361,8 +361,6 @@ CSMDoc::Document::Document(const Files::ConfigurationManager& configuration, std connect(&mRunner, &Runner::runStateChanged, this, &Document::runStateChanged); } -CSMDoc::Document::~Document() {} - QUndoStack& CSMDoc::Document::getUndoStack() { return mUndoStack; diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index 52e4a53ee0..99e081a80c 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -98,7 +98,7 @@ namespace CSMDoc const std::vector& blacklistedScripts, bool fsStrict, const Files::PathContainer& dataPaths, const std::vector& archives); - ~Document(); + ~Document() override = default; QUndoStack& getUndoStack(); diff --git a/apps/opencs/model/doc/stage.cpp b/apps/opencs/model/doc/stage.cpp deleted file mode 100644 index 3c8c107ba0..0000000000 --- a/apps/opencs/model/doc/stage.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage.hpp" - -CSMDoc::Stage::~Stage() {} diff --git a/apps/opencs/model/doc/stage.hpp b/apps/opencs/model/doc/stage.hpp index 1b855becb3..2f1d0fdbd5 100644 --- a/apps/opencs/model/doc/stage.hpp +++ b/apps/opencs/model/doc/stage.hpp @@ -7,7 +7,7 @@ namespace CSMDoc class Stage { public: - virtual ~Stage(); + virtual ~Stage() = default; virtual int setup() = 0; ///< \return number of steps diff --git a/apps/opencs/model/filter/node.cpp b/apps/opencs/model/filter/node.cpp deleted file mode 100644 index e25610675e..0000000000 --- a/apps/opencs/model/filter/node.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "node.hpp" - -CSMFilter::Node::Node() {} - -CSMFilter::Node::~Node() {} diff --git a/apps/opencs/model/filter/node.hpp b/apps/opencs/model/filter/node.hpp index c0ef855360..b143d238d2 100644 --- a/apps/opencs/model/filter/node.hpp +++ b/apps/opencs/model/filter/node.hpp @@ -21,14 +21,11 @@ namespace CSMFilter /// interpreted as "the node and all its children". class Node { - // not implemented - Node(const Node&); - Node& operator=(const Node&); - public: - Node(); - - virtual ~Node(); + Node() = default; + Node(const Node&) = delete; + Node& operator=(const Node&) = delete; + virtual ~Node() = default; virtual bool test(const CSMWorld::IdTableBase& table, int row, const std::map& columns) const = 0; ///< \return Can the specified table row pass through to filter? diff --git a/apps/opencs/model/prefs/setting.cpp b/apps/opencs/model/prefs/setting.cpp index 4468fffaf3..efe360d1e8 100644 --- a/apps/opencs/model/prefs/setting.cpp +++ b/apps/opencs/model/prefs/setting.cpp @@ -23,8 +23,6 @@ CSMPrefs::Setting::Setting(Category* parent, QMutex* mutex, const std::string& k { } -CSMPrefs::Setting::~Setting() {} - std::pair CSMPrefs::Setting::makeWidgets(QWidget* parent) { return std::pair(0, 0); diff --git a/apps/opencs/model/prefs/setting.hpp b/apps/opencs/model/prefs/setting.hpp index 86e80fb107..f63271b3f2 100644 --- a/apps/opencs/model/prefs/setting.hpp +++ b/apps/opencs/model/prefs/setting.hpp @@ -29,7 +29,7 @@ namespace CSMPrefs public: Setting(Category* parent, QMutex* mutex, const std::string& key, const std::string& label); - virtual ~Setting(); + ~Setting() override = default; /// Return label, input widget. /// diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp index 889d528a50..17207ae154 100644 --- a/apps/opencs/model/world/collection.hpp +++ b/apps/opencs/model/world/collection.hpp @@ -98,10 +98,6 @@ namespace CSMWorld std::map mIndex; std::vector*> mColumns; - // not implemented - Collection(const Collection&); - Collection& operator=(const Collection&); - protected: const std::vector>>& getRecords() const; @@ -120,7 +116,9 @@ namespace CSMWorld ///< Returns the index of the record on success, -1 on failure. public: - Collection(); + Collection() = default; + Collection(const Collection&) = delete; + Collection& operator=(const Collection&) = delete; ~Collection() override; @@ -342,11 +340,6 @@ namespace CSMWorld return false; } - template - Collection::Collection() - { - } - template Collection::~Collection() { diff --git a/apps/opencs/model/world/collectionbase.cpp b/apps/opencs/model/world/collectionbase.cpp index e3fb3cf63c..c71bb0afc3 100644 --- a/apps/opencs/model/world/collectionbase.cpp +++ b/apps/opencs/model/world/collectionbase.cpp @@ -7,10 +7,6 @@ #include "columnbase.hpp" -CSMWorld::CollectionBase::CollectionBase() {} - -CSMWorld::CollectionBase::~CollectionBase() {} - int CSMWorld::CollectionBase::getInsertIndex(const ESM::RefId& id, UniversalId::Type type, RecordBase* record) const { return getAppendIndex(id, type); diff --git a/apps/opencs/model/world/collectionbase.hpp b/apps/opencs/model/world/collectionbase.hpp index 64bfb58109..a9bb872b8a 100644 --- a/apps/opencs/model/world/collectionbase.hpp +++ b/apps/opencs/model/world/collectionbase.hpp @@ -29,14 +29,11 @@ namespace CSMWorld /// manually. class CollectionBase { - // not implemented - CollectionBase(const CollectionBase&); - CollectionBase& operator=(const CollectionBase&); - public: - CollectionBase(); - - virtual ~CollectionBase(); + CollectionBase() = default; + CollectionBase(const CollectionBase&) = delete; + CollectionBase& operator=(const CollectionBase&) = delete; + virtual ~CollectionBase() = default; virtual int getSize() const = 0; diff --git a/apps/opencs/model/world/columnbase.cpp b/apps/opencs/model/world/columnbase.cpp index cc4ea92f96..de2e31b0fa 100644 --- a/apps/opencs/model/world/columnbase.cpp +++ b/apps/opencs/model/world/columnbase.cpp @@ -11,8 +11,6 @@ CSMWorld::ColumnBase::ColumnBase(int columnId, Display displayType, int flags) { } -CSMWorld::ColumnBase::~ColumnBase() {} - bool CSMWorld::ColumnBase::isUserEditable() const { return isEditable(); diff --git a/apps/opencs/model/world/columnbase.hpp b/apps/opencs/model/world/columnbase.hpp index 05c0afdf04..e1576bba97 100644 --- a/apps/opencs/model/world/columnbase.hpp +++ b/apps/opencs/model/world/columnbase.hpp @@ -156,7 +156,7 @@ namespace CSMWorld ColumnBase(int columnId, Display displayType, int flag); - virtual ~ColumnBase(); + virtual ~ColumnBase() = default; virtual bool isEditable() const = 0; diff --git a/apps/opencs/model/world/commands.cpp b/apps/opencs/model/world/commands.cpp index b34fc4e14b..da49caef10 100644 --- a/apps/opencs/model/world/commands.cpp +++ b/apps/opencs/model/world/commands.cpp @@ -314,8 +314,6 @@ CSMWorld::RevertCommand::RevertCommand(IdTable& model, const std::string& id, QU setText(("Revert record " + id).c_str()); } -CSMWorld::RevertCommand::~RevertCommand() {} - void CSMWorld::RevertCommand::redo() { mOld = mModel.getRecord(mId).clone(); @@ -351,8 +349,6 @@ CSMWorld::DeleteCommand::DeleteCommand( setText(("Delete record " + id).c_str()); } -CSMWorld::DeleteCommand::~DeleteCommand() {} - void CSMWorld::DeleteCommand::redo() { mOld = mModel.getRecord(mId).clone(); diff --git a/apps/opencs/model/world/commands.hpp b/apps/opencs/model/world/commands.hpp index f9cddd119d..a243950003 100644 --- a/apps/opencs/model/world/commands.hpp +++ b/apps/opencs/model/world/commands.hpp @@ -192,7 +192,7 @@ namespace CSMWorld public: RevertCommand(IdTable& model, const std::string& id, QUndoCommand* parent = nullptr); - virtual ~RevertCommand(); + ~RevertCommand() override = default; void redo() override; @@ -214,7 +214,7 @@ namespace CSMWorld DeleteCommand(IdTable& model, const std::string& id, UniversalId::Type type = UniversalId::Type_None, QUndoCommand* parent = nullptr); - virtual ~DeleteCommand(); + ~DeleteCommand() override = default; void redo() override; diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index b91035f758..69ac8a42b6 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -29,8 +29,6 @@ CSMWorld::IdTable::IdTable(CollectionBase* idCollection, unsigned int features) { } -CSMWorld::IdTable::~IdTable() {} - int CSMWorld::IdTable::rowCount(const QModelIndex& parent) const { if (parent.isValid()) diff --git a/apps/opencs/model/world/idtable.hpp b/apps/opencs/model/world/idtable.hpp index f79e94ad68..3ec075ca95 100644 --- a/apps/opencs/model/world/idtable.hpp +++ b/apps/opencs/model/world/idtable.hpp @@ -36,7 +36,7 @@ namespace CSMWorld IdTable(CollectionBase* idCollection, unsigned int features = 0); ///< The ownership of \a idCollection is not transferred. - virtual ~IdTable(); + virtual ~IdTable() = default; int rowCount(const QModelIndex& parent = QModelIndex()) const override; diff --git a/apps/opencs/model/world/idtree.cpp b/apps/opencs/model/world/idtree.cpp index a88234d63d..da5c415ced 100644 --- a/apps/opencs/model/world/idtree.cpp +++ b/apps/opencs/model/world/idtree.cpp @@ -18,8 +18,6 @@ CSMWorld::IdTree::IdTree(NestedCollection* nestedCollection, CollectionBase* idC { } -CSMWorld::IdTree::~IdTree() {} - int CSMWorld::IdTree::rowCount(const QModelIndex& parent) const { if (hasChildren(parent)) diff --git a/apps/opencs/model/world/idtree.hpp b/apps/opencs/model/world/idtree.hpp index 502ece5339..64e16e3ddb 100644 --- a/apps/opencs/model/world/idtree.hpp +++ b/apps/opencs/model/world/idtree.hpp @@ -35,18 +35,15 @@ namespace CSMWorld private: NestedCollection* mNestedCollection; - // not implemented - IdTree(const IdTree&); - IdTree& operator=(const IdTree&); - unsigned int foldIndexAddress(const QModelIndex& index) const; std::pair unfoldIndexAddress(unsigned int id) const; public: IdTree(NestedCollection* nestedCollection, CollectionBase* idCollection, unsigned int features = 0); ///< The ownerships of \a nestedCollecton and \a idCollection are not transferred. - - ~IdTree() override; + IdTree(const IdTree&) = delete; + IdTree& operator=(const IdTree&) = delete; + ~IdTree() override = default; int rowCount(const QModelIndex& parent = QModelIndex()) const override; diff --git a/apps/opencs/model/world/nestedcoladapterimp.cpp b/apps/opencs/model/world/nestedcoladapterimp.cpp index f609e26483..c4f912301c 100644 --- a/apps/opencs/model/world/nestedcoladapterimp.cpp +++ b/apps/opencs/model/world/nestedcoladapterimp.cpp @@ -25,8 +25,6 @@ namespace CSMWorld { - PathgridPointListAdapter::PathgridPointListAdapter() {} - void PathgridPointListAdapter::addRow(Record& record, int position) const { Pathgrid pathgrid = record.get(); @@ -135,8 +133,6 @@ namespace CSMWorld return static_cast(record.get().mPoints.size()); } - PathgridEdgeListAdapter::PathgridEdgeListAdapter() {} - void PathgridEdgeListAdapter::addRow(Record& record, int position) const { Pathgrid pathgrid = record.get(); @@ -246,8 +242,6 @@ namespace CSMWorld return static_cast(record.get().mEdges.size()); } - FactionReactionsAdapter::FactionReactionsAdapter() {} - void FactionReactionsAdapter::addRow(Record& record, int position) const { ESM::Faction faction = record.get(); @@ -372,8 +366,6 @@ namespace CSMWorld return static_cast(record.get().mReactions.size()); } - RegionSoundListAdapter::RegionSoundListAdapter() {} - void RegionSoundListAdapter::addRow(Record& record, int position) const { ESM::Region region = record.get(); @@ -479,8 +471,6 @@ namespace CSMWorld return static_cast(record.get().mSoundList.size()); } - InfoListAdapter::InfoListAdapter() {} - void InfoListAdapter::addRow(Record& record, int position) const { throw std::logic_error("cannot add a row to a fixed table"); @@ -533,8 +523,6 @@ namespace CSMWorld return 1; // fixed at size 1 } - InfoConditionAdapter::InfoConditionAdapter() {} - void InfoConditionAdapter::addRow(Record& record, int position) const { Info info = record.get(); @@ -722,8 +710,6 @@ namespace CSMWorld return static_cast(record.get().mSelects.size()); } - RaceAttributeAdapter::RaceAttributeAdapter() {} - void RaceAttributeAdapter::addRow(Record& record, int position) const { // Do nothing, this table cannot be changed by the user @@ -807,8 +793,6 @@ namespace CSMWorld return ESM::Attribute::Length; // there are 8 attributes } - RaceSkillsBonusAdapter::RaceSkillsBonusAdapter() {} - void RaceSkillsBonusAdapter::addRow(Record& record, int position) const { // Do nothing, this table cannot be changed by the user @@ -891,8 +875,6 @@ namespace CSMWorld return static_cast(sizeof(record.get().mData.mBonus) / sizeof(record.get().mData.mBonus[0])); } - CellListAdapter::CellListAdapter() {} - void CellListAdapter::addRow(Record& record, int position) const { throw std::logic_error("cannot add a row to a fixed table"); @@ -1064,8 +1046,6 @@ namespace CSMWorld return 1; // fixed at size 1 } - RegionWeatherAdapter::RegionWeatherAdapter() {} - void RegionWeatherAdapter::addRow(Record& record, int position) const { throw std::logic_error("cannot add a row to a fixed table"); @@ -1187,8 +1167,6 @@ namespace CSMWorld return 10; } - FactionRanksAdapter::FactionRanksAdapter() {} - void FactionRanksAdapter::addRow(Record& record, int position) const { throw std::logic_error("cannot add a row to a fixed table"); diff --git a/apps/opencs/model/world/nestedcoladapterimp.hpp b/apps/opencs/model/world/nestedcoladapterimp.hpp index a7dfedc1fd..235396c650 100644 --- a/apps/opencs/model/world/nestedcoladapterimp.hpp +++ b/apps/opencs/model/world/nestedcoladapterimp.hpp @@ -34,7 +34,7 @@ namespace CSMWorld class PathgridPointListAdapter : public NestedColumnAdapter { public: - PathgridPointListAdapter(); + PathgridPointListAdapter() = default; void addRow(Record& record, int position) const override; @@ -56,7 +56,7 @@ namespace CSMWorld class PathgridEdgeListAdapter : public NestedColumnAdapter { public: - PathgridEdgeListAdapter(); + PathgridEdgeListAdapter() = default; void addRow(Record& record, int position) const override; @@ -78,7 +78,7 @@ namespace CSMWorld class FactionReactionsAdapter : public NestedColumnAdapter { public: - FactionReactionsAdapter(); + FactionReactionsAdapter() = default; void addRow(Record& record, int position) const override; @@ -101,7 +101,7 @@ namespace CSMWorld class FactionRanksAdapter : public NestedColumnAdapter { public: - FactionRanksAdapter(); + FactionRanksAdapter() = default; void addRow(Record& record, int position) const override; @@ -124,7 +124,7 @@ namespace CSMWorld class RegionSoundListAdapter : public NestedColumnAdapter { public: - RegionSoundListAdapter(); + RegionSoundListAdapter() = default; void addRow(Record& record, int position) const override; @@ -148,7 +148,7 @@ namespace CSMWorld class SpellListAdapter : public NestedColumnAdapter { public: - SpellListAdapter() {} + SpellListAdapter() = default; void addRow(Record& record, int position) const override { @@ -249,7 +249,7 @@ namespace CSMWorld class EffectsListAdapter : public NestedColumnAdapter { public: - EffectsListAdapter() {} + EffectsListAdapter() = default; void addRow(Record& record, int position) const override { @@ -434,7 +434,7 @@ namespace CSMWorld class InfoListAdapter : public NestedColumnAdapter { public: - InfoListAdapter(); + InfoListAdapter() = default; void addRow(Record& record, int position) const override; @@ -456,7 +456,7 @@ namespace CSMWorld class InfoConditionAdapter : public NestedColumnAdapter { public: - InfoConditionAdapter(); + InfoConditionAdapter() = default; void addRow(Record& record, int position) const override; @@ -478,7 +478,7 @@ namespace CSMWorld class RaceAttributeAdapter : public NestedColumnAdapter { public: - RaceAttributeAdapter(); + RaceAttributeAdapter() = default; void addRow(Record& record, int position) const override; @@ -500,7 +500,7 @@ namespace CSMWorld class RaceSkillsBonusAdapter : public NestedColumnAdapter { public: - RaceSkillsBonusAdapter(); + RaceSkillsBonusAdapter() = default; void addRow(Record& record, int position) const override; @@ -522,7 +522,7 @@ namespace CSMWorld class CellListAdapter : public NestedColumnAdapter { public: - CellListAdapter(); + CellListAdapter() = default; void addRow(Record& record, int position) const override; @@ -545,7 +545,7 @@ namespace CSMWorld class RegionWeatherAdapter : public NestedColumnAdapter { public: - RegionWeatherAdapter(); + RegionWeatherAdapter() = default; void addRow(Record& record, int position) const override; diff --git a/apps/opencs/model/world/nestedcollection.cpp b/apps/opencs/model/world/nestedcollection.cpp index 877fb394cb..14fe4b78a8 100644 --- a/apps/opencs/model/world/nestedcollection.cpp +++ b/apps/opencs/model/world/nestedcollection.cpp @@ -6,10 +6,6 @@ #include "columnbase.hpp" -CSMWorld::NestedCollection::NestedCollection() {} - -CSMWorld::NestedCollection::~NestedCollection() {} - int CSMWorld::NestedCollection::getNestedRowsCount(int row, int column) const { return 0; diff --git a/apps/opencs/model/world/nestedcollection.hpp b/apps/opencs/model/world/nestedcollection.hpp index 3e90bde9cc..08d1c7c5ea 100644 --- a/apps/opencs/model/world/nestedcollection.hpp +++ b/apps/opencs/model/world/nestedcollection.hpp @@ -14,8 +14,8 @@ namespace CSMWorld { public: - NestedCollection(); - virtual ~NestedCollection(); + NestedCollection() = default; + virtual ~NestedCollection() = default; virtual void addNestedRow(int row, int col, int position) = 0; diff --git a/apps/opencs/model/world/nestedcolumnadapter.hpp b/apps/opencs/model/world/nestedcolumnadapter.hpp index 198cc9b18e..ebe77baef6 100644 --- a/apps/opencs/model/world/nestedcolumnadapter.hpp +++ b/apps/opencs/model/world/nestedcolumnadapter.hpp @@ -14,9 +14,9 @@ namespace CSMWorld class NestedColumnAdapter { public: - NestedColumnAdapter() {} + NestedColumnAdapter() = default; - virtual ~NestedColumnAdapter() {} + virtual ~NestedColumnAdapter() = default; virtual void addRow(Record& record, int position) const = 0; diff --git a/apps/opencs/model/world/nestedinfocollection.cpp b/apps/opencs/model/world/nestedinfocollection.cpp index d28df2e010..74a51a9c14 100644 --- a/apps/opencs/model/world/nestedinfocollection.cpp +++ b/apps/opencs/model/world/nestedinfocollection.cpp @@ -17,8 +17,6 @@ namespace CSMWorld { - NestedInfoCollection::NestedInfoCollection() {} - NestedInfoCollection::~NestedInfoCollection() { for (std::map*>::iterator iter(mAdapters.begin()); diff --git a/apps/opencs/model/world/nestedinfocollection.hpp b/apps/opencs/model/world/nestedinfocollection.hpp index 9d26af56e6..a401317aa5 100644 --- a/apps/opencs/model/world/nestedinfocollection.hpp +++ b/apps/opencs/model/world/nestedinfocollection.hpp @@ -26,7 +26,7 @@ namespace CSMWorld const NestedColumnAdapter& getAdapter(const ColumnBase& column) const; public: - NestedInfoCollection(); + NestedInfoCollection() = default; ~NestedInfoCollection() override; void addNestedRow(int row, int column, int position) override; diff --git a/apps/opencs/model/world/nestedtablewrapper.cpp b/apps/opencs/model/world/nestedtablewrapper.cpp index 480f6aab3e..0060276201 100644 --- a/apps/opencs/model/world/nestedtablewrapper.cpp +++ b/apps/opencs/model/world/nestedtablewrapper.cpp @@ -1,9 +1,5 @@ #include "nestedtablewrapper.hpp" -CSMWorld::NestedTableWrapperBase::NestedTableWrapperBase() {} - -CSMWorld::NestedTableWrapperBase::~NestedTableWrapperBase() {} - int CSMWorld::NestedTableWrapperBase::size() const { return -5; diff --git a/apps/opencs/model/world/nestedtablewrapper.hpp b/apps/opencs/model/world/nestedtablewrapper.hpp index 0779988c1d..4756409c96 100644 --- a/apps/opencs/model/world/nestedtablewrapper.hpp +++ b/apps/opencs/model/world/nestedtablewrapper.hpp @@ -5,11 +5,11 @@ namespace CSMWorld { struct NestedTableWrapperBase { - virtual ~NestedTableWrapperBase(); + virtual ~NestedTableWrapperBase() = default; virtual int size() const; - NestedTableWrapperBase(); + NestedTableWrapperBase() = default; }; template @@ -22,7 +22,7 @@ namespace CSMWorld { } - ~NestedTableWrapper() override {} + ~NestedTableWrapper() override = default; int size() const override { diff --git a/apps/opencs/model/world/record.cpp b/apps/opencs/model/world/record.cpp index 27f52c73a1..ddd9050828 100644 --- a/apps/opencs/model/world/record.cpp +++ b/apps/opencs/model/world/record.cpp @@ -1,7 +1,5 @@ #include "record.hpp" -CSMWorld::RecordBase::~RecordBase() {} - bool CSMWorld::RecordBase::isDeleted() const { return mState == State_Deleted || mState == State_Erased; diff --git a/apps/opencs/model/world/record.hpp b/apps/opencs/model/world/record.hpp index 8fc69cfdae..d1f64fbfef 100644 --- a/apps/opencs/model/world/record.hpp +++ b/apps/opencs/model/world/record.hpp @@ -19,7 +19,7 @@ namespace CSMWorld State mState; - virtual ~RecordBase(); + virtual ~RecordBase() = default; virtual std::unique_ptr clone() const = 0; diff --git a/apps/opencs/model/world/refidadapter.cpp b/apps/opencs/model/world/refidadapter.cpp deleted file mode 100644 index 37cb67bca3..0000000000 --- a/apps/opencs/model/world/refidadapter.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "refidadapter.hpp" - -CSMWorld::RefIdAdapter::RefIdAdapter() {} - -CSMWorld::RefIdAdapter::~RefIdAdapter() {} - -CSMWorld::NestedRefIdAdapterBase::NestedRefIdAdapterBase() {} - -CSMWorld::NestedRefIdAdapterBase::~NestedRefIdAdapterBase() {} diff --git a/apps/opencs/model/world/refidadapter.hpp b/apps/opencs/model/world/refidadapter.hpp index b49692c4c4..11ed82d0ff 100644 --- a/apps/opencs/model/world/refidadapter.hpp +++ b/apps/opencs/model/world/refidadapter.hpp @@ -25,14 +25,11 @@ namespace CSMWorld class RefIdAdapter { - // not implemented - RefIdAdapter(const RefIdAdapter&); - RefIdAdapter& operator=(const RefIdAdapter&); - public: - RefIdAdapter(); - - virtual ~RefIdAdapter(); + RefIdAdapter() = default; + RefIdAdapter(const RefIdAdapter&) = delete; + RefIdAdapter& operator=(const RefIdAdapter&) = delete; + virtual ~RefIdAdapter() = default; virtual QVariant getData(const RefIdColumn* column, const RefIdData& data, int idnex) const = 0; ///< If called on the nest column, should return QVariant(true). @@ -48,9 +45,9 @@ namespace CSMWorld class NestedRefIdAdapterBase { public: - NestedRefIdAdapterBase(); + NestedRefIdAdapterBase() = default; - virtual ~NestedRefIdAdapterBase(); + virtual ~NestedRefIdAdapterBase() = default; virtual void setNestedData(const RefIdColumn* column, RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const = 0; diff --git a/apps/opencs/model/world/refidadapterimp.cpp b/apps/opencs/model/world/refidadapterimp.cpp index e387f52d12..5dd2e16ae8 100644 --- a/apps/opencs/model/world/refidadapterimp.cpp +++ b/apps/opencs/model/world/refidadapterimp.cpp @@ -94,8 +94,6 @@ CSMWorld::IngredEffectRefIdAdapter::IngredEffectRefIdAdapter() { } -CSMWorld::IngredEffectRefIdAdapter::~IngredEffectRefIdAdapter() {} - void CSMWorld::IngredEffectRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -882,8 +880,6 @@ void CSMWorld::NpcRefIdAdapter::setData( record.setModified(npc); } -CSMWorld::NpcAttributesRefIdAdapter::NpcAttributesRefIdAdapter() {} - void CSMWorld::NpcAttributesRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -1015,8 +1011,6 @@ int CSMWorld::NpcAttributesRefIdAdapter::getNestedRowsCount( return 8; } -CSMWorld::NpcSkillsRefIdAdapter::NpcSkillsRefIdAdapter() {} - void CSMWorld::NpcSkillsRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -1106,10 +1100,6 @@ int CSMWorld::NpcSkillsRefIdAdapter::getNestedRowsCount( return ESM::Skill::Length; } -CSMWorld::NpcMiscRefIdAdapter::NpcMiscRefIdAdapter() {} - -CSMWorld::NpcMiscRefIdAdapter::~NpcMiscRefIdAdapter() {} - void CSMWorld::NpcMiscRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -1268,8 +1258,6 @@ int CSMWorld::NpcMiscRefIdAdapter::getNestedRowsCount(const RefIdColumn* column, return 1; // fixed at size 1 } -CSMWorld::CreatureAttributesRefIdAdapter::CreatureAttributesRefIdAdapter() {} - void CSMWorld::CreatureAttributesRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -1401,8 +1389,6 @@ int CSMWorld::CreatureAttributesRefIdAdapter::getNestedRowsCount( return 8; } -CSMWorld::CreatureAttackRefIdAdapter::CreatureAttackRefIdAdapter() {} - void CSMWorld::CreatureAttackRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { @@ -1491,10 +1477,6 @@ int CSMWorld::CreatureAttackRefIdAdapter::getNestedRowsCount( return 3; } -CSMWorld::CreatureMiscRefIdAdapter::CreatureMiscRefIdAdapter() {} - -CSMWorld::CreatureMiscRefIdAdapter::~CreatureMiscRefIdAdapter() {} - void CSMWorld::CreatureMiscRefIdAdapter::addNestedRow( const RefIdColumn* column, RefIdData& data, int index, int position) const { diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 9d994a307c..5c54b9a0cf 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -431,14 +431,11 @@ namespace CSMWorld { UniversalId::Type mType; - // not implemented - IngredEffectRefIdAdapter(const IngredEffectRefIdAdapter&); - IngredEffectRefIdAdapter& operator=(const IngredEffectRefIdAdapter&); - public: IngredEffectRefIdAdapter(); - - ~IngredEffectRefIdAdapter() override; + IngredEffectRefIdAdapter(const IngredEffectRefIdAdapter&) = delete; + IngredEffectRefIdAdapter& operator=(const IngredEffectRefIdAdapter&) = delete; + ~IngredEffectRefIdAdapter() override = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -942,7 +939,7 @@ namespace CSMWorld class NpcAttributesRefIdAdapter : public NestedRefIdAdapterBase { public: - NpcAttributesRefIdAdapter(); + NpcAttributesRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -967,7 +964,7 @@ namespace CSMWorld class NpcSkillsRefIdAdapter : public NestedRefIdAdapterBase { public: - NpcSkillsRefIdAdapter(); + NpcSkillsRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -991,12 +988,11 @@ namespace CSMWorld class NpcMiscRefIdAdapter : public NestedRefIdAdapterBase { - NpcMiscRefIdAdapter(const NpcMiscRefIdAdapter&); - NpcMiscRefIdAdapter& operator=(const NpcMiscRefIdAdapter&); - public: - NpcMiscRefIdAdapter(); - ~NpcMiscRefIdAdapter() override; + NpcMiscRefIdAdapter() = default; + NpcMiscRefIdAdapter(const NpcMiscRefIdAdapter&) = delete; + NpcMiscRefIdAdapter& operator=(const NpcMiscRefIdAdapter&) = delete; + ~NpcMiscRefIdAdapter() override = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -1021,7 +1017,7 @@ namespace CSMWorld class CreatureAttributesRefIdAdapter : public NestedRefIdAdapterBase { public: - CreatureAttributesRefIdAdapter(); + CreatureAttributesRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -1046,7 +1042,7 @@ namespace CSMWorld class CreatureAttackRefIdAdapter : public NestedRefIdAdapterBase { public: - CreatureAttackRefIdAdapter(); + CreatureAttackRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -1070,12 +1066,11 @@ namespace CSMWorld class CreatureMiscRefIdAdapter : public NestedRefIdAdapterBase { - CreatureMiscRefIdAdapter(const CreatureMiscRefIdAdapter&); - CreatureMiscRefIdAdapter& operator=(const CreatureMiscRefIdAdapter&); - public: - CreatureMiscRefIdAdapter(); - ~CreatureMiscRefIdAdapter() override; + CreatureMiscRefIdAdapter() = default; + CreatureMiscRefIdAdapter(const CreatureMiscRefIdAdapter&) = delete; + CreatureMiscRefIdAdapter& operator=(const CreatureMiscRefIdAdapter&) = delete; + ~CreatureMiscRefIdAdapter() override = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override; @@ -1115,7 +1110,7 @@ namespace CSMWorld { } - virtual ~EffectsRefIdAdapter() {} + virtual ~EffectsRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -1191,7 +1186,7 @@ namespace CSMWorld { } - virtual ~NestedInventoryRefIdAdapter() {} + virtual ~NestedInventoryRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -1327,7 +1322,7 @@ namespace CSMWorld { } - virtual ~NestedSpellRefIdAdapter() {} + virtual ~NestedSpellRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -1449,7 +1444,7 @@ namespace CSMWorld { } - virtual ~NestedTravelRefIdAdapter() {} + virtual ~NestedTravelRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -1618,7 +1613,7 @@ namespace CSMWorld { } - virtual ~ActorAiRefIdAdapter() {} + virtual ~ActorAiRefIdAdapter() = default; // FIXME: should check if the AI package type is already in the list and use a default // that wasn't used already (in extreme case do not add anything at all? @@ -1974,7 +1969,7 @@ namespace CSMWorld { } - virtual ~BodyPartRefIdAdapter() {} + virtual ~BodyPartRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -2175,7 +2170,7 @@ namespace CSMWorld { } - virtual ~NestedListLevListRefIdAdapter() {} + virtual ~NestedListLevListRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { @@ -2332,7 +2327,7 @@ namespace CSMWorld { } - virtual ~NestedLevListRefIdAdapter() {} + virtual ~NestedLevListRefIdAdapter() = default; void addNestedRow(const RefIdColumn* column, RefIdData& data, int index, int position) const override { diff --git a/apps/opencs/model/world/refiddata.cpp b/apps/opencs/model/world/refiddata.cpp index ba23e67ca9..f738479624 100644 --- a/apps/opencs/model/world/refiddata.cpp +++ b/apps/opencs/model/world/refiddata.cpp @@ -14,8 +14,6 @@ namespace ESM class ESMWriter; } -CSMWorld::RefIdDataContainerBase::~RefIdDataContainerBase() {} - ESM::RefId CSMWorld::RefIdData::getRecordId(const CSMWorld::RefIdData::LocalIndex& index) const { std::map::const_iterator found = mRecordContainers.find(index.second); diff --git a/apps/opencs/model/world/refiddata.hpp b/apps/opencs/model/world/refiddata.hpp index 2425cc89c0..4870e8672a 100644 --- a/apps/opencs/model/world/refiddata.hpp +++ b/apps/opencs/model/world/refiddata.hpp @@ -46,7 +46,7 @@ namespace CSMWorld { struct RefIdDataContainerBase { - virtual ~RefIdDataContainerBase(); + virtual ~RefIdDataContainerBase() = default; virtual int getSize() const = 0; diff --git a/apps/opencs/model/world/resourcetable.cpp b/apps/opencs/model/world/resourcetable.cpp index bf86f4f159..5c15ee90ef 100644 --- a/apps/opencs/model/world/resourcetable.cpp +++ b/apps/opencs/model/world/resourcetable.cpp @@ -15,8 +15,6 @@ CSMWorld::ResourceTable::ResourceTable(const Resources* resources, unsigned int { } -CSMWorld::ResourceTable::~ResourceTable() {} - int CSMWorld::ResourceTable::rowCount(const QModelIndex& parent) const { if (parent.isValid()) diff --git a/apps/opencs/model/world/resourcetable.hpp b/apps/opencs/model/world/resourcetable.hpp index 4cb227e66c..be3ff79f8c 100644 --- a/apps/opencs/model/world/resourcetable.hpp +++ b/apps/opencs/model/world/resourcetable.hpp @@ -24,7 +24,7 @@ namespace CSMWorld /// \note The feature Feature_Constant will be added implicitly. ResourceTable(const Resources* resources, unsigned int features = 0); - ~ResourceTable() override; + ~ResourceTable() override = default; int rowCount(const QModelIndex& parent = QModelIndex()) const override; diff --git a/apps/opencs/model/world/tablemimedata.cpp b/apps/opencs/model/world/tablemimedata.cpp index 0b6dadfae4..37d9a37887 100644 --- a/apps/opencs/model/world/tablemimedata.cpp +++ b/apps/opencs/model/world/tablemimedata.cpp @@ -33,8 +33,6 @@ QStringList CSMWorld::TableMimeData::formats() const return mObjectsFormats; } -CSMWorld::TableMimeData::~TableMimeData() {} - std::string CSMWorld::TableMimeData::getIcon() const { if (mUniversalId.empty()) diff --git a/apps/opencs/model/world/tablemimedata.hpp b/apps/opencs/model/world/tablemimedata.hpp index d0c47bfceb..bcee8c0f10 100644 --- a/apps/opencs/model/world/tablemimedata.hpp +++ b/apps/opencs/model/world/tablemimedata.hpp @@ -44,7 +44,7 @@ namespace CSMWorld TableMimeData(const std::vector& id, const CSMDoc::Document& document); - ~TableMimeData(); + ~TableMimeData() override = default; QStringList formats() const override; diff --git a/apps/opencs/view/doc/loader.cpp b/apps/opencs/view/doc/loader.cpp index 498f86c1c1..9d98635ef4 100644 --- a/apps/opencs/view/doc/loader.cpp +++ b/apps/opencs/view/doc/loader.cpp @@ -149,8 +149,6 @@ void CSVDoc::LoadingDocument::cancel() } } -CSVDoc::Loader::Loader() {} - CSVDoc::Loader::~Loader() { for (std::map::iterator iter(mDocuments.begin()); iter != mDocuments.end(); diff --git a/apps/opencs/view/doc/loader.hpp b/apps/opencs/view/doc/loader.hpp index d28f1b902a..223d77ce3c 100644 --- a/apps/opencs/view/doc/loader.hpp +++ b/apps/opencs/view/doc/loader.hpp @@ -73,7 +73,7 @@ namespace CSVDoc std::map mDocuments; public: - Loader(); + Loader() = default; ~Loader() override; diff --git a/apps/opencs/view/doc/sizehint.cpp b/apps/opencs/view/doc/sizehint.cpp index 4337835149..8b907ead09 100644 --- a/apps/opencs/view/doc/sizehint.cpp +++ b/apps/opencs/view/doc/sizehint.cpp @@ -5,8 +5,6 @@ CSVDoc::SizeHintWidget::SizeHintWidget(QWidget* parent) { } -CSVDoc::SizeHintWidget::~SizeHintWidget() {} - QSize CSVDoc::SizeHintWidget::sizeHint() const { return mSize; diff --git a/apps/opencs/view/doc/sizehint.hpp b/apps/opencs/view/doc/sizehint.hpp index 7f43f28bb4..a0296a51ec 100644 --- a/apps/opencs/view/doc/sizehint.hpp +++ b/apps/opencs/view/doc/sizehint.hpp @@ -12,7 +12,7 @@ namespace CSVDoc public: SizeHintWidget(QWidget* parent = nullptr); - ~SizeHintWidget() override; + ~SizeHintWidget() override = default; QSize sizeHint() const override; void setSizeHint(const QSize& size); diff --git a/apps/opencs/view/doc/subviewfactory.cpp b/apps/opencs/view/doc/subviewfactory.cpp index e353b53f8a..8330a2c869 100644 --- a/apps/opencs/view/doc/subviewfactory.cpp +++ b/apps/opencs/view/doc/subviewfactory.cpp @@ -8,12 +8,6 @@ #include -CSVDoc::SubViewFactoryBase::SubViewFactoryBase() {} - -CSVDoc::SubViewFactoryBase::~SubViewFactoryBase() {} - -CSVDoc::SubViewFactoryManager::SubViewFactoryManager() {} - CSVDoc::SubViewFactoryManager::~SubViewFactoryManager() { for (std::map::iterator iter(mSubViewFactories.begin()); diff --git a/apps/opencs/view/doc/subviewfactory.hpp b/apps/opencs/view/doc/subviewfactory.hpp index f4d95e7eaa..d3630c5e96 100644 --- a/apps/opencs/view/doc/subviewfactory.hpp +++ b/apps/opencs/view/doc/subviewfactory.hpp @@ -16,14 +16,11 @@ namespace CSVDoc class SubViewFactoryBase { - // not implemented - SubViewFactoryBase(const SubViewFactoryBase&); - SubViewFactoryBase& operator=(const SubViewFactoryBase&); - public: - SubViewFactoryBase(); - - virtual ~SubViewFactoryBase(); + SubViewFactoryBase() = default; + SubViewFactoryBase(const SubViewFactoryBase&) = delete; + SubViewFactoryBase& operator=(const SubViewFactoryBase&) = delete; + virtual ~SubViewFactoryBase() = default; virtual SubView* makeSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document) = 0; ///< The ownership of the returned sub view is not transferred. @@ -33,13 +30,10 @@ namespace CSVDoc { std::map mSubViewFactories; - // not implemented - SubViewFactoryManager(const SubViewFactoryManager&); - SubViewFactoryManager& operator=(const SubViewFactoryManager&); - public: - SubViewFactoryManager(); - + SubViewFactoryManager() = default; + SubViewFactoryManager(const SubViewFactoryManager&) = delete; + SubViewFactoryManager& operator=(const SubViewFactoryManager&) = delete; ~SubViewFactoryManager(); void add(const CSMWorld::UniversalId::Type& id, SubViewFactoryBase* factory); diff --git a/apps/opencs/view/doc/view.cpp b/apps/opencs/view/doc/view.cpp index c8332ef8ba..08db4efa5e 100644 --- a/apps/opencs/view/doc/view.cpp +++ b/apps/opencs/view/doc/view.cpp @@ -538,8 +538,6 @@ CSVDoc::View::View(ViewManager& viewManager, CSMDoc::Document* document, int tot connect(&CSMPrefs::State::get(), &CSMPrefs::State::settingChanged, this, &View::settingChanged); } -CSVDoc::View::~View() {} - const CSMDoc::Document* CSVDoc::View::getDocument() const { return mDocument; diff --git a/apps/opencs/view/doc/view.hpp b/apps/opencs/view/doc/view.hpp index 4654635160..165cb0da8e 100644 --- a/apps/opencs/view/doc/view.hpp +++ b/apps/opencs/view/doc/view.hpp @@ -58,10 +58,6 @@ namespace CSVDoc QScrollArea* mScroll; bool mScrollbarOnly; - // not implemented - View(const View&); - View& operator=(const View&); - private: void closeEvent(QCloseEvent* event) override; @@ -107,10 +103,10 @@ namespace CSVDoc public: View(ViewManager& viewManager, CSMDoc::Document* document, int totalViews); - ///< The ownership of \a document is not transferred to *this. - - ~View() override; + View(const View&) = delete; + View& operator=(const View&) = delete; + ~View() override = default; const CSMDoc::Document* getDocument() const; diff --git a/apps/opencs/view/render/cameracontroller.cpp b/apps/opencs/view/render/cameracontroller.cpp index bd22ec744f..10033cb51f 100644 --- a/apps/opencs/view/render/cameracontroller.cpp +++ b/apps/opencs/view/render/cameracontroller.cpp @@ -45,8 +45,6 @@ namespace CSVRender { } - CameraController::~CameraController() {} - bool CameraController::isActive() const { return mActive; diff --git a/apps/opencs/view/render/cameracontroller.hpp b/apps/opencs/view/render/cameracontroller.hpp index d6dce9f695..a026087f61 100644 --- a/apps/opencs/view/render/cameracontroller.hpp +++ b/apps/opencs/view/render/cameracontroller.hpp @@ -32,7 +32,7 @@ namespace CSVRender static const osg::Vec3d LocalForward; CameraController(QObject* parent); - virtual ~CameraController(); + ~CameraController() override = default; bool isActive() const; diff --git a/apps/opencs/view/render/lighting.cpp b/apps/opencs/view/render/lighting.cpp index 1d150c42a8..94b3f02ea7 100644 --- a/apps/opencs/view/render/lighting.cpp +++ b/apps/opencs/view/render/lighting.cpp @@ -62,8 +62,6 @@ private: int mIndex; }; -CSVRender::Lighting::~Lighting() {} - void CSVRender::Lighting::updateDayNightMode(int index) { if (mRootNode == nullptr) diff --git a/apps/opencs/view/render/lighting.hpp b/apps/opencs/view/render/lighting.hpp index 28747dd765..88d9c710c0 100644 --- a/apps/opencs/view/render/lighting.hpp +++ b/apps/opencs/view/render/lighting.hpp @@ -19,7 +19,7 @@ namespace CSVRender : mRootNode(nullptr) { } - virtual ~Lighting(); + virtual ~Lighting() = default; virtual void activate(osg::Group* rootNode, bool isExterior) = 0; diff --git a/apps/opencs/view/render/lightingday.cpp b/apps/opencs/view/render/lightingday.cpp index c960d18e81..50aef93f1f 100644 --- a/apps/opencs/view/render/lightingday.cpp +++ b/apps/opencs/view/render/lightingday.cpp @@ -5,8 +5,6 @@ #include #include -CSVRender::LightingDay::LightingDay() {} - void CSVRender::LightingDay::activate(osg::Group* rootNode, bool /*isExterior*/) { mRootNode = rootNode; diff --git a/apps/opencs/view/render/lightingday.hpp b/apps/opencs/view/render/lightingday.hpp index 925eda5847..e68d496b21 100644 --- a/apps/opencs/view/render/lightingday.hpp +++ b/apps/opencs/view/render/lightingday.hpp @@ -15,7 +15,7 @@ namespace CSVRender class LightingDay : public Lighting { public: - LightingDay(); + LightingDay() = default; void activate(osg::Group* rootNode, bool /*isExterior*/) override; diff --git a/apps/opencs/view/render/lightingnight.cpp b/apps/opencs/view/render/lightingnight.cpp index 898df865ce..6628a4983b 100644 --- a/apps/opencs/view/render/lightingnight.cpp +++ b/apps/opencs/view/render/lightingnight.cpp @@ -5,8 +5,6 @@ #include #include -CSVRender::LightingNight::LightingNight() {} - void CSVRender::LightingNight::activate(osg::Group* rootNode, bool isExterior) { mRootNode = rootNode; diff --git a/apps/opencs/view/render/lightingnight.hpp b/apps/opencs/view/render/lightingnight.hpp index 7fd4739f12..1a813bd540 100644 --- a/apps/opencs/view/render/lightingnight.hpp +++ b/apps/opencs/view/render/lightingnight.hpp @@ -15,7 +15,7 @@ namespace CSVRender class LightingNight : public Lighting { public: - LightingNight(); + LightingNight() = default; void activate(osg::Group* rootNode, bool isExterior) override; void deactivate() override; diff --git a/apps/opencs/view/render/orbitcameramode.cpp b/apps/opencs/view/render/orbitcameramode.cpp index c387eb6957..26fc015cf1 100644 --- a/apps/opencs/view/render/orbitcameramode.cpp +++ b/apps/opencs/view/render/orbitcameramode.cpp @@ -28,8 +28,6 @@ namespace CSVRender connect(mCenterShortcut, qOverload<>(&CSMPrefs::Shortcut::activated), this, &OrbitCameraMode::centerSelection); } - OrbitCameraMode::~OrbitCameraMode() {} - void OrbitCameraMode::activate(CSVWidget::SceneToolbar* toolbar) { mCenterOnSelection = new QAction("Center on selected object", this); diff --git a/apps/opencs/view/render/orbitcameramode.hpp b/apps/opencs/view/render/orbitcameramode.hpp index 4c230ffebb..30a92fdb4e 100644 --- a/apps/opencs/view/render/orbitcameramode.hpp +++ b/apps/opencs/view/render/orbitcameramode.hpp @@ -29,7 +29,7 @@ namespace CSVRender public: OrbitCameraMode(WorldspaceWidget* worldspaceWidget, const QIcon& icon, const QString& tooltip = "", QWidget* parent = nullptr); - ~OrbitCameraMode(); + ~OrbitCameraMode() override = default; void activate(CSVWidget::SceneToolbar* toolbar) override; void deactivate(CSVWidget::SceneToolbar* toolbar) override; diff --git a/apps/opencs/view/render/worldspacewidget.cpp b/apps/opencs/view/render/worldspacewidget.cpp index 691939efb7..6911f5f043 100644 --- a/apps/opencs/view/render/worldspacewidget.cpp +++ b/apps/opencs/view/render/worldspacewidget.cpp @@ -138,8 +138,6 @@ CSVRender::WorldspaceWidget::WorldspaceWidget(CSMDoc::Document& document, QWidge mInConstructor = false; } -CSVRender::WorldspaceWidget::~WorldspaceWidget() {} - void CSVRender::WorldspaceWidget::settingChanged(const CSMPrefs::Setting* setting) { if (*setting == "3D Scene Input/drag-factor") diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index fc375d17e5..442f4922f0 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -119,7 +119,7 @@ namespace CSVRender }; WorldspaceWidget(CSMDoc::Document& document, QWidget* parent = nullptr); - ~WorldspaceWidget(); + ~WorldspaceWidget() = default; CSVWidget::SceneToolMode* makeNavigationSelector(CSVWidget::SceneToolbar* parent); ///< \attention The created tool is not added to the toolbar (via addTool). Doing that diff --git a/apps/opencs/view/world/creator.cpp b/apps/opencs/view/world/creator.cpp index 3e34e4f811..45b2faf3e3 100644 --- a/apps/opencs/view/world/creator.cpp +++ b/apps/opencs/view/world/creator.cpp @@ -10,16 +10,12 @@ namespace CSMDoc class Document; } -CSVWorld::Creator::~Creator() {} - void CSVWorld::Creator::setScope(unsigned int scope) { if (scope != CSMWorld::Scope_Content) throw std::logic_error("Invalid scope in creator"); } -CSVWorld::CreatorFactoryBase::~CreatorFactoryBase() {} - CSVWorld::Creator* CSVWorld::NullCreatorFactory::makeCreator( CSMDoc::Document& document, const CSMWorld::UniversalId& id) const { diff --git a/apps/opencs/view/world/creator.hpp b/apps/opencs/view/world/creator.hpp index e52aea0508..ed2c754b1a 100644 --- a/apps/opencs/view/world/creator.hpp +++ b/apps/opencs/view/world/creator.hpp @@ -21,7 +21,7 @@ namespace CSVWorld Q_OBJECT public: - virtual ~Creator(); + ~Creator() override = default; virtual void reset() = 0; @@ -53,7 +53,7 @@ namespace CSVWorld class CreatorFactoryBase { public: - virtual ~CreatorFactoryBase(); + virtual ~CreatorFactoryBase() = default; virtual Creator* makeCreator(CSMDoc::Document& document, const CSMWorld::UniversalId& id) const = 0; ///< The ownership of the returned Creator is transferred to the caller. diff --git a/apps/opencs/view/world/datadisplaydelegate.cpp b/apps/opencs/view/world/datadisplaydelegate.cpp index 55bc50fe79..fc6a2b7d80 100644 --- a/apps/opencs/view/world/datadisplaydelegate.cpp +++ b/apps/opencs/view/world/datadisplaydelegate.cpp @@ -148,8 +148,6 @@ void CSVWorld::DataDisplayDelegate::updateDisplayMode(const std::string& mode) mDisplayMode = Mode_TextOnly; } -CSVWorld::DataDisplayDelegate::~DataDisplayDelegate() {} - void CSVWorld::DataDisplayDelegate::settingChanged(const CSMPrefs::Setting* setting) { if (*setting == mSettingKey) diff --git a/apps/opencs/view/world/datadisplaydelegate.hpp b/apps/opencs/view/world/datadisplaydelegate.hpp index 7fa69d113c..087fc2a084 100755 --- a/apps/opencs/view/world/datadisplaydelegate.hpp +++ b/apps/opencs/view/world/datadisplaydelegate.hpp @@ -68,7 +68,7 @@ namespace CSVWorld DataDisplayDelegate(const ValueList& values, const IconList& icons, CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, const std::string& pageName, const std::string& settingName, QObject* parent); - ~DataDisplayDelegate(); + ~DataDisplayDelegate() = default; void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; diff --git a/apps/opencs/view/world/enumdelegate.cpp b/apps/opencs/view/world/enumdelegate.cpp index 1dcadd7fe5..188860e2a6 100644 --- a/apps/opencs/view/world/enumdelegate.cpp +++ b/apps/opencs/view/world/enumdelegate.cpp @@ -134,8 +134,6 @@ QSize CSVWorld::EnumDelegate::sizeHint(const QStyleOptionViewItem& option, const return option.rect.size(); } -CSVWorld::EnumDelegateFactory::EnumDelegateFactory() {} - CSVWorld::EnumDelegateFactory::EnumDelegateFactory(const char** names, bool allowNone) { assert(names); diff --git a/apps/opencs/view/world/enumdelegate.hpp b/apps/opencs/view/world/enumdelegate.hpp index 44d1360aba..e80b61fa8f 100644 --- a/apps/opencs/view/world/enumdelegate.hpp +++ b/apps/opencs/view/world/enumdelegate.hpp @@ -59,7 +59,7 @@ namespace CSVWorld std::vector> mValues; public: - EnumDelegateFactory(); + EnumDelegateFactory() = default; EnumDelegateFactory(const char** names, bool allowNone = false); ///< \param names Array of char pointer with a 0-pointer as end mark diff --git a/apps/opencs/view/world/util.cpp b/apps/opencs/view/world/util.cpp index ef927dd0aa..dfb587cd96 100644 --- a/apps/opencs/view/world/util.cpp +++ b/apps/opencs/view/world/util.cpp @@ -55,8 +55,6 @@ QVariant CSVWorld::NastyTableModelHack::getData() const return mData; } -CSVWorld::CommandDelegateFactory::~CommandDelegateFactory() {} - CSVWorld::CommandDelegateFactoryCollection* CSVWorld::CommandDelegateFactoryCollection::sThis = nullptr; CSVWorld::CommandDelegateFactoryCollection::CommandDelegateFactoryCollection() diff --git a/apps/opencs/view/world/util.hpp b/apps/opencs/view/world/util.hpp index d584b0ad9f..243608e2e5 100644 --- a/apps/opencs/view/world/util.hpp +++ b/apps/opencs/view/world/util.hpp @@ -57,7 +57,7 @@ namespace CSVWorld class CommandDelegateFactory { public: - virtual ~CommandDelegateFactory(); + virtual ~CommandDelegateFactory() = default; virtual CommandDelegate* makeDelegate( CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, QObject* parent) const = 0; diff --git a/apps/wizard/inisettings.cpp b/apps/wizard/inisettings.cpp index 1eb142b120..3f5855ad79 100644 --- a/apps/wizard/inisettings.cpp +++ b/apps/wizard/inisettings.cpp @@ -10,10 +10,6 @@ #include -Wizard::IniSettings::IniSettings() {} - -Wizard::IniSettings::~IniSettings() {} - QStringList Wizard::IniSettings::findKeys(const QString& text) { QStringList result; diff --git a/apps/wizard/inisettings.hpp b/apps/wizard/inisettings.hpp index fa1f388329..c8cd30c3c1 100644 --- a/apps/wizard/inisettings.hpp +++ b/apps/wizard/inisettings.hpp @@ -14,8 +14,7 @@ namespace Wizard class IniSettings { public: - explicit IniSettings(); - ~IniSettings(); + explicit IniSettings() = default; inline QVariant value(const QString& key, const QVariant& defaultValue = QVariant()) const { diff --git a/apps/wizard/unshield/unshieldworker.cpp b/apps/wizard/unshield/unshieldworker.cpp index 61162f5627..767d35d4f5 100644 --- a/apps/wizard/unshield/unshieldworker.cpp +++ b/apps/wizard/unshield/unshieldworker.cpp @@ -40,8 +40,6 @@ Wizard::UnshieldWorker::UnshieldWorker(qint64 expectedMorrowindBsaSize, QObject* qRegisterMetaType("Wizard::Component"); } -Wizard::UnshieldWorker::~UnshieldWorker() {} - void Wizard::UnshieldWorker::stopWorker() { mStopped = true; diff --git a/apps/wizard/unshield/unshieldworker.hpp b/apps/wizard/unshield/unshieldworker.hpp index c3194232a5..4807fe9b17 100644 --- a/apps/wizard/unshield/unshieldworker.hpp +++ b/apps/wizard/unshield/unshieldworker.hpp @@ -25,7 +25,7 @@ namespace Wizard public: UnshieldWorker(qint64 expectedMorrowindBsaSize, QObject* parent = nullptr); - ~UnshieldWorker() override; + ~UnshieldWorker() override = default; void stopWorker();