diff --git a/AI/Nullkiller/Analyzers/ArmyManager.h b/AI/Nullkiller/Analyzers/ArmyManager.h index 5d422aa9e..fddad9fcb 100644 --- a/AI/Nullkiller/Analyzers/ArmyManager.h +++ b/AI/Nullkiller/Analyzers/ArmyManager.h @@ -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( diff --git a/AI/Nullkiller/Analyzers/HeroManager.h b/AI/Nullkiller/Analyzers/HeroManager.h index 5ac745c02..8ade6cf7c 100644 --- a/AI/Nullkiller/Analyzers/HeroManager.h +++ b/AI/Nullkiller/Analyzers/HeroManager.h @@ -20,6 +20,7 @@ class DLL_EXPORT IHeroManager //: public: IAbstractManager { public: + virtual ~IHeroManager() = default; virtual const std::map & getHeroRoles() const = 0; virtual int selectBestSkill(const HeroPtr & hero, const std::vector & 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; -}; \ No newline at end of file +}; diff --git a/AI/Nullkiller/Engine/PriorityEvaluator.h b/AI/Nullkiller/Engine/PriorityEvaluator.h index 5ce11de5b..6bcd09c32 100644 --- a/AI/Nullkiller/Engine/PriorityEvaluator.h +++ b/AI/Nullkiller/Engine/PriorityEvaluator.h @@ -61,6 +61,7 @@ struct DLL_EXPORT EvaluationContext class IEvaluationContextBuilder { public: + virtual ~IEvaluationContextBuilder() = default; virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal goal) const = 0; }; diff --git a/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h b/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h index 6d7cbbbac..51977963b 100644 --- a/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h +++ b/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h @@ -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; } -}; \ No newline at end of file +}; diff --git a/AI/Nullkiller/Pathfinding/Actors.h b/AI/Nullkiller/Pathfinding/Actors.h index ff2618df2..2f18df369 100644 --- a/AI/Nullkiller/Pathfinding/Actors.h +++ b/AI/Nullkiller/Pathfinding/Actors.h @@ -75,7 +75,8 @@ public: TResources armyCost; std::shared_ptr 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; -}; \ No newline at end of file +}; diff --git a/AI/VCAI/ArmyManager.h b/AI/VCAI/ArmyManager.h index 7579207da..5e29b41b1 100644 --- a/AI/VCAI/ArmyManager.h +++ b/AI/VCAI/ArmyManager.h @@ -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; diff --git a/CCallback.h b/CCallback.h index 76f4413d0..4a1828917 100644 --- a/CCallback.h +++ b/CCallback.h @@ -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 diff --git a/client/gui/SDL_Extensions.h b/client/gui/SDL_Extensions.h index b88054bfa..bc5401a37 100644 --- a/client/gui/SDL_Extensions.h +++ b/client/gui/SDL_Extensions.h @@ -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; }; diff --git a/include/vcmi/ServerCallback.h b/include/vcmi/ServerCallback.h index a9a722d4d..af35b4ea5 100644 --- a/include/vcmi/ServerCallback.h +++ b/include/vcmi/ServerCallback.h @@ -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; diff --git a/lib/CPathfinder.h b/lib/CPathfinder.h index 2bd7e5790..c047701a4 100644 --- a/lib/CPathfinder.h +++ b/lib/CPathfinder.h @@ -386,6 +386,9 @@ class DLL_LINKAGE INodeStorage { public: using ELayer = EPathfindingLayer; + + virtual ~INodeStorage() = default; + virtual std::vector getInitialNodes() = 0; virtual std::vector calculateNeighbours( @@ -448,6 +451,7 @@ public: PathfinderConfig( std::shared_ptr nodeStorage, std::vector> rules); + virtual ~PathfinderConfig() = default; virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) = 0; };