diff --git a/components/esm/containerstate.hpp b/components/esm/containerstate.hpp index 33818d4f15..b0c4da2d1b 100644 --- a/components/esm/containerstate.hpp +++ b/components/esm/containerstate.hpp @@ -8,18 +8,18 @@ namespace ESM { // format 0, saved games only - struct ContainerState : public ObjectState + struct ContainerState final : public ObjectState { InventoryState mInventory; - virtual void load (ESMReader &esm); - virtual void save (ESMWriter &esm, bool inInventory = false) const; + void load (ESMReader &esm) final; + void save (ESMWriter &esm, bool inInventory = false) const final; - virtual ContainerState& asContainerState() + ContainerState& asContainerState() final { return *this; } - virtual const ContainerState& asContainerState() const + const ContainerState& asContainerState() const final { return *this; } diff --git a/components/esm/creaturelevliststate.hpp b/components/esm/creaturelevliststate.hpp index 4d0b726a0e..ec0bc8667d 100644 --- a/components/esm/creaturelevliststate.hpp +++ b/components/esm/creaturelevliststate.hpp @@ -7,19 +7,19 @@ namespace ESM { // format 0, saved games only - struct CreatureLevListState : public ObjectState + struct CreatureLevListState final : public ObjectState { int mSpawnActorId; bool mSpawn; - virtual void load (ESMReader &esm); - virtual void save (ESMWriter &esm, bool inInventory = false) const; + void load (ESMReader &esm) final; + void save (ESMWriter &esm, bool inInventory = false) const final; - virtual CreatureLevListState& asCreatureLevListState() + CreatureLevListState& asCreatureLevListState() final { return *this; } - virtual const CreatureLevListState& asCreatureLevListState() const + const CreatureLevListState& asCreatureLevListState() const final { return *this; } diff --git a/components/esm/creaturestate.hpp b/components/esm/creaturestate.hpp index ca0d2601a9..3e9a44d560 100644 --- a/components/esm/creaturestate.hpp +++ b/components/esm/creaturestate.hpp @@ -9,7 +9,7 @@ namespace ESM { // format 0, saved games only - struct CreatureState : public ObjectState + struct CreatureState final : public ObjectState { InventoryState mInventory; CreatureStats mCreatureStats; @@ -17,14 +17,14 @@ namespace ESM /// Initialize to default state void blank(); - virtual void load (ESMReader &esm); - virtual void save (ESMWriter &esm, bool inInventory = false) const; + void load (ESMReader &esm) final; + void save (ESMWriter &esm, bool inInventory = false) const final; - virtual CreatureState& asCreatureState() + CreatureState& asCreatureState() final { return *this; } - virtual const CreatureState& asCreatureState() const + const CreatureState& asCreatureState() const final { return *this; } diff --git a/components/esm/doorstate.hpp b/components/esm/doorstate.hpp index 1251b90594..04ad110d6b 100644 --- a/components/esm/doorstate.hpp +++ b/components/esm/doorstate.hpp @@ -7,18 +7,18 @@ namespace ESM { // format 0, saved games only - struct DoorState : public ObjectState + struct DoorState final : public ObjectState { int mDoorState = 0; - virtual void load (ESMReader &esm); - virtual void save (ESMWriter &esm, bool inInventory = false) const; + void load (ESMReader &esm) final; + void save (ESMWriter &esm, bool inInventory = false) const final; - virtual DoorState& asDoorState() + DoorState& asDoorState() final { return *this; } - virtual const DoorState& asDoorState() const + const DoorState& asDoorState() const final { return *this; } diff --git a/components/esm/npcstate.hpp b/components/esm/npcstate.hpp index 4ae026da6b..6c04690500 100644 --- a/components/esm/npcstate.hpp +++ b/components/esm/npcstate.hpp @@ -10,7 +10,7 @@ namespace ESM { // format 0, saved games only - struct NpcState : public ObjectState + struct NpcState final : public ObjectState { InventoryState mInventory; NpcStats mNpcStats; @@ -19,14 +19,14 @@ namespace ESM /// Initialize to default state void blank(); - virtual void load (ESMReader &esm); - virtual void save (ESMWriter &esm, bool inInventory = false) const; + void load (ESMReader &esm) final; + void save (ESMWriter &esm, bool inInventory = false) const final; - virtual NpcState& asNpcState() + NpcState& asNpcState() final { return *this; } - virtual const NpcState& asNpcState() const + const NpcState& asNpcState() const final { return *this; }