Mark several classes as final for devirtualization performance benefits.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
b006344d83
commit
de8b5de7b4
|
@ -4,7 +4,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class AttackUseEvent : public EventData {
|
class AttackUseEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<ExecutingAttack> _attack;
|
ArbUt::BorrowedPtr<ExecutingAttack> _attack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class ChangeSpeciesEvent : public EventData {
|
class ChangeSpeciesEvent final : public EventData {
|
||||||
const ArbUt::BorrowedPtr<Creature> _creature;
|
const ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
const ArbUt::BorrowedPtr<const CreatureLib::Library::CreatureSpecies> _newSpecies;
|
const ArbUt::BorrowedPtr<const CreatureLib::Library::CreatureSpecies> _newSpecies;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class ChangeVariantEvent : public EventData {
|
class ChangeVariantEvent final : public EventData {
|
||||||
const ArbUt::BorrowedPtr<Creature> _creature;
|
const ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
const ArbUt::BorrowedPtr<const CreatureLib::Library::SpeciesVariant> _newVariant;
|
const ArbUt::BorrowedPtr<const CreatureLib::Library::SpeciesVariant> _newVariant;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class DamageEvent : public EventData {
|
class DamageEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<Creature> _creature;
|
ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
DamageSource _damageSource;
|
DamageSource _damageSource;
|
||||||
uint32_t _originalHealth;
|
uint32_t _originalHealth;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class DisplayTextEvent : public EventData {
|
class DisplayTextEvent final : public EventData {
|
||||||
const ArbUt::StringView _text;
|
const ArbUt::StringView _text;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class ExperienceGainEvent : public EventData {
|
class ExperienceGainEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<Creature> _creature;
|
ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
uint32_t _previousExperience;
|
uint32_t _previousExperience;
|
||||||
uint32_t _newExperience;
|
uint32_t _newExperience;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class FaintEvent : public EventData {
|
class FaintEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<Creature> _creature;
|
ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class HealEvent : public EventData {
|
class HealEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<Creature> _creature;
|
ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
uint32_t _originalHealth;
|
uint32_t _originalHealth;
|
||||||
uint32_t _newHealth;
|
uint32_t _newHealth;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class MissEvent : public EventData {
|
class MissEvent final : public EventData {
|
||||||
ArbUt::BorrowedPtr<Creature> _creature;
|
ArbUt::BorrowedPtr<Creature> _creature;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class SwitchEvent : public EventData {
|
class SwitchEvent final : public EventData {
|
||||||
CreatureIndex _index;
|
CreatureIndex _index;
|
||||||
ArbUt::BorrowedPtr<Creature> _newCreature;
|
ArbUt::BorrowedPtr<Creature> _newCreature;
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
#include "EventData.hpp"
|
#include "EventData.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class TurnStartEvent : public EventData {
|
class TurnStartEvent final : public EventData {
|
||||||
public:
|
public:
|
||||||
TurnStartEvent() {}
|
TurnStartEvent() {}
|
||||||
EventDataKind GetKind() const noexcept override { return EventDataKind ::TurnStart; }
|
EventDataKind GetKind() const noexcept override { return EventDataKind ::TurnStart; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class TurnEndEvent : public EventData {
|
class TurnEndEvent final : public EventData {
|
||||||
public:
|
public:
|
||||||
TurnEndEvent() {}
|
TurnEndEvent() {}
|
||||||
EventDataKind GetKind() const noexcept override { return EventDataKind ::TurnEnd; }
|
EventDataKind GetKind() const noexcept override { return EventDataKind ::TurnEnd; }
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "HistoryElement.hpp"
|
#include "HistoryElement.hpp"
|
||||||
|
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class AttackUseHistory : public HistoryElement {
|
class AttackUseHistory final : public HistoryElement {
|
||||||
std::unique_ptr<const ExecutingAttack> _attack;
|
std::unique_ptr<const ExecutingAttack> _attack;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue