savegame ex.: use NSDMI, =default the default ctor

Modernizes the code.

Task-number: QTBUG-108857
Change-Id: I6ddf1de3699506ffc0fc4b1034ab48defafcf174
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 35b94f8b4349581c548b7aac2e858750072efa19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-02-07 13:52:50 +01:00 committed by Qt Cherry-pick Bot
parent b630442d20
commit eb4d4c8f64
2 changed files with 4 additions and 6 deletions

View File

@ -6,10 +6,8 @@
#include <QMetaEnum> #include <QMetaEnum>
#include <QTextStream> #include <QTextStream>
Character::Character() : Character::Character()
mLevel(0), = default;
mClassType(Warrior) {
}
Character::Character(const QString &name, Character::Character(const QString &name,
int level, int level,

View File

@ -37,8 +37,8 @@ public:
void print(int indentation = 0) const; void print(int indentation = 0) const;
private: private:
QString mName; QString mName;
int mLevel; int mLevel = 0;
ClassType mClassType; ClassType mClassType = Warrior;
}; };
//! [0] //! [0]