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

pull/578/head
elsid 5 years ago
parent 05884e690f
commit 5209f5ff6d
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

Loading…
Cancel
Save