1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

add missing virtual destructors

This commit is contained in:
Andrey Filipenkov 2022-09-22 11:02:16 +03:00
parent 8e1c88e8c5
commit a1cf120ea6
10 changed files with 21 additions and 4 deletions

View File

@ -41,6 +41,7 @@ struct ArmyUpgradeInfo
class DLL_EXPORT IArmyManager //: public: IAbstractManager
{
public:
virtual ~IArmyManager() = default;
virtual void update() = 0;
virtual ui64 howManyReinforcementsCanBuy(const CCreatureSet * target, const CGDwelling * source) const = 0;
virtual ui64 howManyReinforcementsCanBuy(

View File

@ -20,6 +20,7 @@
class DLL_EXPORT IHeroManager //: public: IAbstractManager
{
public:
virtual ~IHeroManager() = default;
virtual const std::map<HeroPtr, HeroRole> & getHeroRoles() const = 0;
virtual int selectBestSkill(const HeroPtr & hero, const std::vector<SecondarySkill> & skills) const = 0;
virtual HeroRole getHeroRole(const HeroPtr & hero) const = 0;
@ -31,6 +32,7 @@ public:
class DLL_EXPORT ISecondarySkillRule
{
public:
virtual ~ISecondarySkillRule() = default;
virtual void evaluateScore(const CGHeroInstance * hero, SecondarySkill skill, float & score) const = 0;
};
@ -102,4 +104,4 @@ private:
public:
void evaluateScore(const CGHeroInstance * hero, SecondarySkill skill, float & score) const override;
};
};

View File

@ -61,6 +61,7 @@ struct DLL_EXPORT EvaluationContext
class IEvaluationContextBuilder
{
public:
virtual ~IEvaluationContextBuilder() = default;
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal goal) const = 0;
};

View File

@ -18,6 +18,8 @@ struct AIPathNode;
class SpecialAction
{
public:
virtual ~SpecialAction() = default;
virtual bool canAct(const AIPathNode * source) const
{
return true;
@ -39,4 +41,4 @@ public:
virtual std::string toString() const = 0;
virtual const CGObjectInstance * targetObject() const { return nullptr; }
};
};

View File

@ -75,7 +75,8 @@ public:
TResources armyCost;
std::shared_ptr<TurnInfo> tiCache;
ChainActor(){}
ChainActor() = default;
virtual ~ChainActor() = default;
virtual std::string toString() const;
ExchangeResult tryExchangeNoLock(const ChainActor * other) const { return tryExchangeNoLock(this, other); }
@ -168,4 +169,4 @@ private:
public:
TownGarrisonActor(const CGTownInstance * town, uint64_t chainMask);
virtual std::string toString() const override;
};
};

View File

@ -28,6 +28,7 @@ struct SlotInfo
class DLL_EXPORT IArmyManager //: public: IAbstractManager
{
public:
virtual ~IArmyManager() = default;
virtual void init(CPlayerSpecificInfoCallback * CB) = 0;
virtual void setAI(VCAI * AI) = 0;
virtual bool canGetArmy(const CArmedInstance * target, const CArmedInstance * source) const = 0;

View File

@ -35,6 +35,8 @@ struct ArtifactLocation;
class IBattleCallback
{
public:
virtual ~IBattleCallback() = default;
bool waitTillRealize; //if true, request functions will return after they are realized by server
bool unlockGsWhenWaiting;//if true after sending each request, gs mutex will be unlocked so the changes can be applied; NOTICE caller must have gs mx locked prior to any call to actiob callback!
//battle

View File

@ -155,6 +155,7 @@ typedef void (*BlitterWithRotationVal)(SDL_Surface *src,SDL_Rect srcRect, SDL_Su
class ColorShifter
{
public:
virtual ~ColorShifter() = default;
virtual SDL_Color shiftColor(SDL_Color clr) const = 0;
};

View File

@ -27,6 +27,8 @@ struct CatapultAttack;
class DLL_LINKAGE ServerCallback
{
public:
virtual ~ServerCallback() = default;
virtual void complain(const std::string & problem) = 0;
virtual bool describeChanges() const = 0;

View File

@ -386,6 +386,9 @@ class DLL_LINKAGE INodeStorage
{
public:
using ELayer = EPathfindingLayer;
virtual ~INodeStorage() = default;
virtual std::vector<CGPathNode *> getInitialNodes() = 0;
virtual std::vector<CGPathNode *> calculateNeighbours(
@ -448,6 +451,7 @@ public:
PathfinderConfig(
std::shared_ptr<INodeStorage> nodeStorage,
std::vector<std::shared_ptr<IPathfindingRule>> rules);
virtual ~PathfinderConfig() = default;
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) = 0;
};