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 <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]