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:
parent
88e8094f18
commit
35b94f8b43
@ -6,10 +6,8 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QTextStream>
|
||||
|
||||
Character::Character() :
|
||||
mLevel(0),
|
||||
mClassType(Warrior) {
|
||||
}
|
||||
Character::Character()
|
||||
= default;
|
||||
|
||||
Character::Character(const QString &name,
|
||||
int level,
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user