1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 03:15:32 +00:00

Mark all derived classes from ESM::ObjectsState and overriden functions as final

This commit is contained in:
elsid 2020-06-06 23:00:53 +02:00
parent 05884e690f
commit 5209f5ff6d
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
5 changed files with 25 additions and 25 deletions

View file

@ -8,18 +8,18 @@ namespace ESM
{ {
// format 0, saved games only // format 0, saved games only
struct ContainerState : public ObjectState struct ContainerState final : public ObjectState
{ {
InventoryState mInventory; InventoryState mInventory;
virtual void load (ESMReader &esm); void load (ESMReader &esm) final;
virtual void save (ESMWriter &esm, bool inInventory = false) const; void save (ESMWriter &esm, bool inInventory = false) const final;
virtual ContainerState& asContainerState() ContainerState& asContainerState() final
{ {
return *this; return *this;
} }
virtual const ContainerState& asContainerState() const const ContainerState& asContainerState() const final
{ {
return *this; return *this;
} }

View file

@ -7,19 +7,19 @@ namespace ESM
{ {
// format 0, saved games only // format 0, saved games only
struct CreatureLevListState : public ObjectState struct CreatureLevListState final : public ObjectState
{ {
int mSpawnActorId; int mSpawnActorId;
bool mSpawn; bool mSpawn;
virtual void load (ESMReader &esm); void load (ESMReader &esm) final;
virtual void save (ESMWriter &esm, bool inInventory = false) const; void save (ESMWriter &esm, bool inInventory = false) const final;
virtual CreatureLevListState& asCreatureLevListState() CreatureLevListState& asCreatureLevListState() final
{ {
return *this; return *this;
} }
virtual const CreatureLevListState& asCreatureLevListState() const const CreatureLevListState& asCreatureLevListState() const final
{ {
return *this; return *this;
} }

View file

@ -9,7 +9,7 @@ namespace ESM
{ {
// format 0, saved games only // format 0, saved games only
struct CreatureState : public ObjectState struct CreatureState final : public ObjectState
{ {
InventoryState mInventory; InventoryState mInventory;
CreatureStats mCreatureStats; CreatureStats mCreatureStats;
@ -17,14 +17,14 @@ namespace ESM
/// Initialize to default state /// Initialize to default state
void blank(); void blank();
virtual void load (ESMReader &esm); void load (ESMReader &esm) final;
virtual void save (ESMWriter &esm, bool inInventory = false) const; void save (ESMWriter &esm, bool inInventory = false) const final;
virtual CreatureState& asCreatureState() CreatureState& asCreatureState() final
{ {
return *this; return *this;
} }
virtual const CreatureState& asCreatureState() const const CreatureState& asCreatureState() const final
{ {
return *this; return *this;
} }

View file

@ -7,18 +7,18 @@ namespace ESM
{ {
// format 0, saved games only // format 0, saved games only
struct DoorState : public ObjectState struct DoorState final : public ObjectState
{ {
int mDoorState = 0; int mDoorState = 0;
virtual void load (ESMReader &esm); void load (ESMReader &esm) final;
virtual void save (ESMWriter &esm, bool inInventory = false) const; void save (ESMWriter &esm, bool inInventory = false) const final;
virtual DoorState& asDoorState() DoorState& asDoorState() final
{ {
return *this; return *this;
} }
virtual const DoorState& asDoorState() const const DoorState& asDoorState() const final
{ {
return *this; return *this;
} }

View file

@ -10,7 +10,7 @@ namespace ESM
{ {
// format 0, saved games only // format 0, saved games only
struct NpcState : public ObjectState struct NpcState final : public ObjectState
{ {
InventoryState mInventory; InventoryState mInventory;
NpcStats mNpcStats; NpcStats mNpcStats;
@ -19,14 +19,14 @@ namespace ESM
/// Initialize to default state /// Initialize to default state
void blank(); void blank();
virtual void load (ESMReader &esm); void load (ESMReader &esm) final;
virtual void save (ESMWriter &esm, bool inInventory = false) const; void save (ESMWriter &esm, bool inInventory = false) const final;
virtual NpcState& asNpcState() NpcState& asNpcState() final
{ {
return *this; return *this;
} }
virtual const NpcState& asNpcState() const const NpcState& asNpcState() const final
{ {
return *this; return *this;
} }