Skip to content

Commit

Permalink
AURORA: Remove empty user-provided destructors in GFF4 and LocString
Browse files Browse the repository at this point in the history
Because implicit copy constructors and assignment operators with
user-provided destructors are deprecated in C++11.
  • Loading branch information
DrMcCoy committed May 5, 2019
1 parent bd8bad1 commit e6872d5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
8 changes: 0 additions & 8 deletions src/aurora/gff4file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ Common::UString GFF4File::getSharedString(uint32 i) const {
}


GFF4Struct::Field::Field() : label(0), type(kFieldTypeNone), offset(0xFFFFFFFF),
isList(false), isReference(false), isGeneric(false), structIndex(0) {

}

GFF4Struct::Field::Field(uint32 l, uint16 t, uint16 f, uint32 o, bool g) :
label(l), offset(o), isGeneric(g) {

Expand Down Expand Up @@ -354,9 +349,6 @@ GFF4Struct::Field::Field(uint32 l, uint16 t, uint16 f, uint32 o, bool g) :
(int) type, isList, isReference);
}

GFF4Struct::Field::~Field() {
}


GFF4Struct::GFF4Struct(GFF4File &parent, uint32 offset, const GFF4File::StructTemplate &tmplt) :
_parent(&parent), _label(tmplt.label), _refCount(0), _fieldCount(0) {
Expand Down
20 changes: 10 additions & 10 deletions src/aurora/gff4file.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,20 +343,20 @@ class GFF4Struct {
private:
/** A field in the GFF4 struct. */
struct Field {
uint32 label; ///< A numerical label of the field.
FieldType type; ///< Type of the field.
uint32 offset; ///< Offset into the GFF4 data.
uint32 label { 0 }; ///< A numerical label of the field.
FieldType type { kFieldTypeNone }; ///< Type of the field.
uint32 offset { 0xFFFFFFFF }; ///< Offset into the GFF4 data.

bool isList; ///< Is this field a singular item or a list?
bool isReference; ///< Is this field a reference (pointer) to another field?
bool isGeneric; ///< Is this field found in a generic?
bool isList { false }; ///< Is this field a singular item or a list?
bool isReference { false }; ///< Is this field a reference (pointer) to another field?
bool isGeneric { false }; ///< Is this field found in a generic?

uint16 structIndex; ///< Index of the field's struct type (if kFieldTypeStruct).
GFF4List structs; ///< List of GFF4Struct (if kFieldTypeStruct).
uint16 structIndex { 0 }; ///< Index of the field's struct type (if kFieldTypeStruct).
GFF4List structs; ///< List of GFF4Struct (if kFieldTypeStruct).

Field();
Field() = default;
Field(uint32 l, uint16 t, uint16 f, uint32 o, bool g = false);
~Field();
~Field() = default;
};

typedef std::map<uint32, Field> FieldMap;
Expand Down
6 changes: 0 additions & 6 deletions src/aurora/locstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@

namespace Aurora {

LocString::LocString() : _id(kStrRefInvalid) {
}

LocString::~LocString() {
}

void LocString::clear() {
_id = kStrRefInvalid;

Expand Down
6 changes: 3 additions & 3 deletions src/aurora/locstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class LocString {
SubLocString(uint32 l = 0, const Common::UString &s = "") : language(l), str(s) { }
};

LocString();
~LocString();
LocString() = default;
~LocString() = default;

void clear();

Expand Down Expand Up @@ -109,7 +109,7 @@ class LocString {
private:
typedef std::map<uint32, Common::UString> StringMap;

uint32 _id; ///< The string's ID / StrRef.
uint32 _id { kStrRefInvalid }; ///< The string's ID / StrRef.

StringMap _strings;

Expand Down

0 comments on commit e6872d5

Please sign in to comment.