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

Modernizes the code.

Task-number: QTBUG-108857
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I6ddf1de3699506ffc0fc4b1034ab48defafcf174
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Marc Mutz 2023-02-07 13:52:50 +01:00
parent 88e8094f18
commit 35b94f8b43
2 changed files with 4 additions and 6 deletions

View File

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

View File

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