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:
parent
8e1c88e8c5
commit
a1cf120ea6
@ -41,6 +41,7 @@ struct ArmyUpgradeInfo
|
|||||||
class DLL_EXPORT IArmyManager //: public: IAbstractManager
|
class DLL_EXPORT IArmyManager //: public: IAbstractManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~IArmyManager() = default;
|
||||||
virtual void update() = 0;
|
virtual void update() = 0;
|
||||||
virtual ui64 howManyReinforcementsCanBuy(const CCreatureSet * target, const CGDwelling * source) const = 0;
|
virtual ui64 howManyReinforcementsCanBuy(const CCreatureSet * target, const CGDwelling * source) const = 0;
|
||||||
virtual ui64 howManyReinforcementsCanBuy(
|
virtual ui64 howManyReinforcementsCanBuy(
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
class DLL_EXPORT IHeroManager //: public: IAbstractManager
|
class DLL_EXPORT IHeroManager //: public: IAbstractManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~IHeroManager() = default;
|
||||||
virtual const std::map<HeroPtr, HeroRole> & getHeroRoles() const = 0;
|
virtual const std::map<HeroPtr, HeroRole> & getHeroRoles() const = 0;
|
||||||
virtual int selectBestSkill(const HeroPtr & hero, const std::vector<SecondarySkill> & skills) const = 0;
|
virtual int selectBestSkill(const HeroPtr & hero, const std::vector<SecondarySkill> & skills) const = 0;
|
||||||
virtual HeroRole getHeroRole(const HeroPtr & hero) const = 0;
|
virtual HeroRole getHeroRole(const HeroPtr & hero) const = 0;
|
||||||
@ -31,6 +32,7 @@ public:
|
|||||||
class DLL_EXPORT ISecondarySkillRule
|
class DLL_EXPORT ISecondarySkillRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~ISecondarySkillRule() = default;
|
||||||
virtual void evaluateScore(const CGHeroInstance * hero, SecondarySkill skill, float & score) const = 0;
|
virtual void evaluateScore(const CGHeroInstance * hero, SecondarySkill skill, float & score) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ struct DLL_EXPORT EvaluationContext
|
|||||||
class IEvaluationContextBuilder
|
class IEvaluationContextBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~IEvaluationContextBuilder() = default;
|
||||||
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal goal) const = 0;
|
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal goal) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ struct AIPathNode;
|
|||||||
class SpecialAction
|
class SpecialAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~SpecialAction() = default;
|
||||||
|
|
||||||
virtual bool canAct(const AIPathNode * source) const
|
virtual bool canAct(const AIPathNode * source) const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -75,7 +75,8 @@ public:
|
|||||||
TResources armyCost;
|
TResources armyCost;
|
||||||
std::shared_ptr<TurnInfo> tiCache;
|
std::shared_ptr<TurnInfo> tiCache;
|
||||||
|
|
||||||
ChainActor(){}
|
ChainActor() = default;
|
||||||
|
virtual ~ChainActor() = default;
|
||||||
|
|
||||||
virtual std::string toString() const;
|
virtual std::string toString() const;
|
||||||
ExchangeResult tryExchangeNoLock(const ChainActor * other) const { return tryExchangeNoLock(this, other); }
|
ExchangeResult tryExchangeNoLock(const ChainActor * other) const { return tryExchangeNoLock(this, other); }
|
||||||
|
@ -28,6 +28,7 @@ struct SlotInfo
|
|||||||
class DLL_EXPORT IArmyManager //: public: IAbstractManager
|
class DLL_EXPORT IArmyManager //: public: IAbstractManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~IArmyManager() = default;
|
||||||
virtual void init(CPlayerSpecificInfoCallback * CB) = 0;
|
virtual void init(CPlayerSpecificInfoCallback * CB) = 0;
|
||||||
virtual void setAI(VCAI * AI) = 0;
|
virtual void setAI(VCAI * AI) = 0;
|
||||||
virtual bool canGetArmy(const CArmedInstance * target, const CArmedInstance * source) const = 0;
|
virtual bool canGetArmy(const CArmedInstance * target, const CArmedInstance * source) const = 0;
|
||||||
|
@ -35,6 +35,8 @@ struct ArtifactLocation;
|
|||||||
class IBattleCallback
|
class IBattleCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~IBattleCallback() = default;
|
||||||
|
|
||||||
bool waitTillRealize; //if true, request functions will return after they are realized by server
|
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!
|
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
|
//battle
|
||||||
|
@ -155,6 +155,7 @@ typedef void (*BlitterWithRotationVal)(SDL_Surface *src,SDL_Rect srcRect, SDL_Su
|
|||||||
class ColorShifter
|
class ColorShifter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~ColorShifter() = default;
|
||||||
virtual SDL_Color shiftColor(SDL_Color clr) const = 0;
|
virtual SDL_Color shiftColor(SDL_Color clr) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ struct CatapultAttack;
|
|||||||
class DLL_LINKAGE ServerCallback
|
class DLL_LINKAGE ServerCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~ServerCallback() = default;
|
||||||
|
|
||||||
virtual void complain(const std::string & problem) = 0;
|
virtual void complain(const std::string & problem) = 0;
|
||||||
virtual bool describeChanges() const = 0;
|
virtual bool describeChanges() const = 0;
|
||||||
|
|
||||||
|
@ -386,6 +386,9 @@ class DLL_LINKAGE INodeStorage
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using ELayer = EPathfindingLayer;
|
using ELayer = EPathfindingLayer;
|
||||||
|
|
||||||
|
virtual ~INodeStorage() = default;
|
||||||
|
|
||||||
virtual std::vector<CGPathNode *> getInitialNodes() = 0;
|
virtual std::vector<CGPathNode *> getInitialNodes() = 0;
|
||||||
|
|
||||||
virtual std::vector<CGPathNode *> calculateNeighbours(
|
virtual std::vector<CGPathNode *> calculateNeighbours(
|
||||||
@ -448,6 +451,7 @@ public:
|
|||||||
PathfinderConfig(
|
PathfinderConfig(
|
||||||
std::shared_ptr<INodeStorage> nodeStorage,
|
std::shared_ptr<INodeStorage> nodeStorage,
|
||||||
std::vector<std::shared_ptr<IPathfindingRule>> rules);
|
std::vector<std::shared_ptr<IPathfindingRule>> rules);
|
||||||
|
virtual ~PathfinderConfig() = default;
|
||||||
|
|
||||||
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) = 0;
|
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) = 0;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user