1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

Remove more redundant virtual specifiers

`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":",2)
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
This commit is contained in:
Alexander Wilms 2024-02-13 15:21:30 +01:00
parent 7cf5e317a4
commit 678cacbd25
44 changed files with 76 additions and 76 deletions

View File

@ -25,8 +25,8 @@ namespace Goals
{ {
} }
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const BuildingBehavior & other) const override bool operator==(const BuildingBehavior & other) const override
{ {
return true; return true;

View File

@ -24,8 +24,8 @@ namespace Goals
{ {
} }
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const BuyArmyBehavior & other) const override bool operator==(const BuyArmyBehavior & other) const override
{ {
return true; return true;

View File

@ -48,8 +48,8 @@ namespace Goals
specificObjects = true; specificObjects = true;
} }
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
CaptureObjectsBehavior & ofType(int type) CaptureObjectsBehavior & ofType(int type)
{ {

View File

@ -29,7 +29,7 @@ namespace Goals
} }
TGoalVec decompose() const override; TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const ClusterBehavior & other) const override bool operator==(const ClusterBehavior & other) const override
{ {

View File

@ -29,8 +29,8 @@ namespace Goals
{ {
} }
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const DefenceBehavior & other) const override bool operator==(const DefenceBehavior & other) const override
{ {

View File

@ -26,7 +26,7 @@ namespace Goals
} }
TGoalVec decompose() const override; TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const GatherArmyBehavior & other) const override bool operator==(const GatherArmyBehavior & other) const override
{ {

View File

@ -26,7 +26,7 @@ namespace Goals
} }
TGoalVec decompose() const override; TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const RecruitHeroBehavior & other) const override bool operator==(const RecruitHeroBehavior & other) const override
{ {

View File

@ -26,7 +26,7 @@ namespace Goals
} }
TGoalVec decompose() const override; TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const StartupBehavior & other) const override bool operator==(const StartupBehavior & other) const override
{ {

View File

@ -26,7 +26,7 @@ namespace Goals
} }
TGoalVec decompose() const override; TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool operator==(const StayAtTownBehavior & other) const override bool operator==(const StayAtTownBehavior & other) const override
{ {

View File

@ -702,7 +702,7 @@ int32_t RewardEvaluator::getGoldReward(const CGObjectInstance * target, const CG
class HeroExchangeEvaluator : public IEvaluationContextBuilder class HeroExchangeEvaluator : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::HERO_EXCHANGE) if(task->goalType != Goals::HERO_EXCHANGE)
return; return;
@ -719,7 +719,7 @@ public:
class ArmyUpgradeEvaluator : public IEvaluationContextBuilder class ArmyUpgradeEvaluator : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::ARMY_UPGRADE) if(task->goalType != Goals::ARMY_UPGRADE)
return; return;
@ -736,7 +736,7 @@ public:
class StayAtTownManaRecoveryEvaluator : public IEvaluationContextBuilder class StayAtTownManaRecoveryEvaluator : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::STAY_AT_TOWN) if(task->goalType != Goals::STAY_AT_TOWN)
return; return;
@ -771,7 +771,7 @@ void addTileDanger(EvaluationContext & evaluationContext, const int3 & tile, uin
class DefendTownEvaluator : public IEvaluationContextBuilder class DefendTownEvaluator : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::DEFEND_TOWN) if(task->goalType != Goals::DEFEND_TOWN)
return; return;
@ -821,7 +821,7 @@ private:
public: public:
ExecuteHeroChainEvaluationContextBuilder(const Nullkiller * ai) : ai(ai) {} ExecuteHeroChainEvaluationContextBuilder(const Nullkiller * ai) : ai(ai) {}
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::EXECUTE_HERO_CHAIN) if(task->goalType != Goals::EXECUTE_HERO_CHAIN)
return; return;
@ -879,7 +879,7 @@ class ClusterEvaluationContextBuilder : public IEvaluationContextBuilder
public: public:
ClusterEvaluationContextBuilder(const Nullkiller * ai) {} ClusterEvaluationContextBuilder(const Nullkiller * ai) {}
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::UNLOCK_CLUSTER) if(task->goalType != Goals::UNLOCK_CLUSTER)
return; return;
@ -926,7 +926,7 @@ public:
class ExchangeSwapTownHeroesContextBuilder : public IEvaluationContextBuilder class ExchangeSwapTownHeroesContextBuilder : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::EXCHANGE_SWAP_TOWN_HEROES) if(task->goalType != Goals::EXCHANGE_SWAP_TOWN_HEROES)
return; return;
@ -954,7 +954,7 @@ private:
public: public:
DismissHeroContextBuilder(const Nullkiller * ai) : ai(ai) {} DismissHeroContextBuilder(const Nullkiller * ai) : ai(ai) {}
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::DISMISS_HERO) if(task->goalType != Goals::DISMISS_HERO)
return; return;
@ -974,7 +974,7 @@ public:
class BuildThisEvaluationContextBuilder : public IEvaluationContextBuilder class BuildThisEvaluationContextBuilder : public IEvaluationContextBuilder
{ {
public: public:
virtual void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override void buildEvaluationContext(EvaluationContext & evaluationContext, Goals::TSubgoal task) const override
{ {
if(task->goalType != Goals::BUILD_STRUCTURE) if(task->goalType != Goals::BUILD_STRUCTURE)
return; return;

View File

@ -40,7 +40,7 @@ namespace Goals
BuildThis(BuildingID Bid, const CGTownInstance * tid); BuildThis(BuildingID Bid, const CGTownInstance * tid);
bool operator==(const BuildThis & other) const override; bool operator==(const BuildThis & other) const override;
virtual std::string toString() const override; std::string toString() const override;
void accept(AIGateway * ai) override; void accept(AIGateway * ai) override;
}; };
} }

View File

@ -38,7 +38,7 @@ namespace Goals
bool operator==(const BuyArmy & other) const override; bool operator==(const BuyArmy & other) const override;
virtual std::string toString() const override; std::string toString() const override;
void accept(AIGateway * ai) override; void accept(AIGateway * ai) override;
}; };

View File

@ -92,7 +92,7 @@ namespace Goals
bool isElementar() const override { return true; } bool isElementar() const override { return true; }
virtual HeroPtr getHero() const override { return AbstractGoal::hero; } HeroPtr getHero() const override { return AbstractGoal::hero; }
int getHeroExchangeCount() const override { return 0; } int getHeroExchangeCount() const override { return 0; }
}; };

View File

@ -35,8 +35,8 @@ namespace Goals
} }
bool operator==(const CaptureObject & other) const override; bool operator==(const CaptureObject & other) const override;
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool hasHash() const override { return true; } bool hasHash() const override { return true; }
uint64_t getHash() const override; uint64_t getHash() const override;
}; };

View File

@ -29,8 +29,8 @@ namespace Goals
{ {
} }
virtual Goals::TGoalVec decompose() const override; Goals::TGoalVec decompose() const override;
virtual std::string toString() const override; std::string toString() const override;
bool hasHash() const override { return true; } bool hasHash() const override { return true; }
uint64_t getHash() const override; uint64_t getHash() const override;

View File

@ -27,7 +27,7 @@ namespace Goals
} }
bool operator==(const Composition & other) const override; bool operator==(const Composition & other) const override;
virtual std::string toString() const override; std::string toString() const override;
void accept(AIGateway * ai) override; void accept(AIGateway * ai) override;
Composition & addNext(const AbstractGoal & goal); Composition & addNext(const AbstractGoal & goal);
Composition & addNext(TSubgoal goal); Composition & addNext(TSubgoal goal);

View File

@ -37,7 +37,7 @@ namespace Goals
return true; return true;
} }
virtual std::string toString() const override std::string toString() const override
{ {
return "Invalid"; return "Invalid";
} }

View File

@ -43,7 +43,7 @@ namespace Goals
return true; return true;
} }
virtual std::string toString() const override; std::string toString() const override;
void accept(AIGateway * ai) override; void accept(AIGateway * ai) override;
}; };
} }

View File

@ -27,7 +27,7 @@ namespace Goals
StayAtTown(const CGTownInstance * town, AIPath & path); StayAtTown(const CGTownInstance * town, AIPath & path);
bool operator==(const StayAtTown & other) const override; bool operator==(const StayAtTown & other) const override;
virtual std::string toString() const override; std::string toString() const override;
void accept(AIGateway * ai) override; void accept(AIGateway * ai) override;
float getMovementWasted() const { return movementWasted; } float getMovementWasted() const { return movementWasted; }
}; };

View File

@ -30,7 +30,7 @@ namespace Goals
ArmyUpgrade(const CGHeroInstance * targetMain, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade); ArmyUpgrade(const CGHeroInstance * targetMain, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade);
bool operator==(const ArmyUpgrade & other) const override; bool operator==(const ArmyUpgrade & other) const override;
virtual std::string toString() const override; std::string toString() const override;
uint64_t getUpgradeValue() const { return upgradeValue; } uint64_t getUpgradeValue() const { return upgradeValue; }
uint64_t getInitialArmyValue() const { return initialValue; } uint64_t getInitialArmyValue() const { return initialValue; }

View File

@ -31,7 +31,7 @@ namespace Goals
DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const CGHeroInstance * defender); DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const CGHeroInstance * defender);
bool operator==(const DefendTown & other) const override; bool operator==(const DefendTown & other) const override;
virtual std::string toString() const override; std::string toString() const override;
const HitMapInfo & getTreat() const { return treat; } const HitMapInfo & getTreat() const { return treat; }

View File

@ -29,7 +29,7 @@ namespace Goals
} }
bool operator==(const HeroExchange & other) const override; bool operator==(const HeroExchange & other) const override;
virtual std::string toString() const override; std::string toString() const override;
uint64_t getReinforcementArmyStrength() const; uint64_t getReinforcementArmyStrength() const;
}; };

View File

@ -37,7 +37,7 @@ namespace Goals
} }
bool operator==(const UnlockCluster & other) const override; bool operator==(const UnlockCluster & other) const override;
virtual std::string toString() const override; std::string toString() const override;
std::shared_ptr<ObjectCluster> getCluster() const { return cluster; } std::shared_ptr<ObjectCluster> getCluster() const { return cluster; }
const AIPath & getPathToCenter() { return pathToCenter; } const AIPath & getPathToCenter() { return pathToCenter; }
}; };

View File

@ -188,7 +188,7 @@ public:
bool selectFirstActor(); bool selectFirstActor();
bool selectNextActor(); bool selectNextActor();
virtual std::vector<CGPathNode *> getInitialNodes() override; std::vector<CGPathNode *> getInitialNodes() override;
virtual std::vector<CGPathNode *> calculateNeighbours( virtual std::vector<CGPathNode *> calculateNeighbours(
const PathNodeInfo & source, const PathNodeInfo & source,

View File

@ -40,7 +40,7 @@ namespace AIPathfinding
bool canAct(const AIPathNode * source) const override; bool canAct(const AIPathNode * source) const override;
virtual std::string toString() const override; std::string toString() const override;
}; };
class WaterWalkingAction : public AdventureCastAction class WaterWalkingAction : public AdventureCastAction

View File

@ -30,7 +30,7 @@ namespace AIPathfinding
void execute(const CGHeroInstance * hero) const override; void execute(const CGHeroInstance * hero) const override;
virtual std::string toString() const override; std::string toString() const override;
}; };
} }

View File

@ -38,7 +38,7 @@ namespace AIPathfinding
const ChainActor * getActor(const ChainActor * sourceActor) const override; const ChainActor * getActor(const ChainActor * sourceActor) const override;
virtual std::string toString() const override; std::string toString() const override;
private: private:
int32_t getManaCost(const CGHeroInstance * hero) const; int32_t getManaCost(const CGHeroInstance * hero) const;
@ -60,11 +60,11 @@ namespace AIPathfinding
void execute(const CGHeroInstance * hero) const override; void execute(const CGHeroInstance * hero) const override;
virtual Goals::TSubgoal decompose(const CGHeroInstance * hero) const override; Goals::TSubgoal decompose(const CGHeroInstance * hero) const override;
const ChainActor * getActor(const ChainActor * sourceActor) const override; const ChainActor * getActor(const ChainActor * sourceActor) const override;
virtual std::string toString() const override; std::string toString() const override;
const CGObjectInstance * targetObject() const override; const CGObjectInstance * targetObject() const override;
}; };

View File

@ -30,11 +30,11 @@ namespace AIPathfinding
bool canAct(const AIPathNode * node) const override; bool canAct(const AIPathNode * node) const override;
virtual Goals::TSubgoal decompose(const CGHeroInstance * hero) const override; Goals::TSubgoal decompose(const CGHeroInstance * hero) const override;
void execute(const CGHeroInstance * hero) const override; void execute(const CGHeroInstance * hero) const override;
virtual std::string toString() const override; std::string toString() const override;
}; };
} }

View File

@ -31,7 +31,7 @@ namespace AIPathfinding
void execute(const CGHeroInstance * hero) const override; void execute(const CGHeroInstance * hero) const override;
virtual std::string toString() const override; std::string toString() const override;
}; };
} }

View File

@ -136,7 +136,7 @@ private:
public: public:
ObjectActor(const CGObjectInstance * obj, const CCreatureSet * army, uint64_t chainMask, int initialTurn); ObjectActor(const CGObjectInstance * obj, const CCreatureSet * army, uint64_t chainMask, int initialTurn);
virtual std::string toString() const override; std::string toString() const override;
const CGObjectInstance * getActorObject() const override; const CGObjectInstance * getActorObject() const override;
}; };
@ -154,7 +154,7 @@ private:
public: public:
DwellingActor(const CGDwelling * dwelling, uint64_t chainMask, bool waitForGrowth, int dayOfWeek); DwellingActor(const CGDwelling * dwelling, uint64_t chainMask, bool waitForGrowth, int dayOfWeek);
~DwellingActor(); ~DwellingActor();
virtual std::string toString() const override; std::string toString() const override;
protected: protected:
int getInitialTurn(bool waitForGrowth, int dayOfWeek); int getInitialTurn(bool waitForGrowth, int dayOfWeek);
@ -168,7 +168,7 @@ private:
public: public:
TownGarrisonActor(const CGTownInstance * town, uint64_t chainMask); TownGarrisonActor(const CGTownInstance * town, uint64_t chainMask);
virtual std::string toString() const override; std::string toString() const override;
}; };
} }

View File

@ -87,7 +87,7 @@ public:
void initialize(const PathfinderOptions & options, const CGameState * gs) override; void initialize(const PathfinderOptions & options, const CGameState * gs) override;
virtual std::vector<CGPathNode *> getInitialNodes() override; std::vector<CGPathNode *> getInitialNodes() override;
virtual std::vector<CGPathNode *> calculateNeighbours( virtual std::vector<CGPathNode *> calculateNeighbours(
const PathNodeInfo & source, const PathNodeInfo & source,

View File

@ -25,6 +25,6 @@ namespace AIPathfinding
{ {
} }
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
}; };
} }

View File

@ -40,7 +40,7 @@ namespace AIPathfinding
{ {
} }
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
virtual void applyOnDestination( virtual void applyOnDestination(
const CGHeroInstance * hero, const CGHeroInstance * hero,
@ -66,6 +66,6 @@ namespace AIPathfinding
{ {
} }
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
}; };
} }

View File

@ -27,6 +27,6 @@ namespace AIPathfinding
{ {
} }
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override; Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
}; };
} }

View File

@ -70,8 +70,8 @@ public:
const std::string & identifier, const std::string & identifier,
size_t index) override; size_t index) override;
virtual const std::vector<std::string> & getTypeNames() const override; const std::vector<std::string> & getTypeNames() const override;
virtual std::vector<JsonNode> loadLegacyData() override; std::vector<JsonNode> loadLegacyData() override;
}; };
VCMI_LIB_NAMESPACE_END VCMI_LIB_NAMESPACE_END

View File

@ -127,7 +127,7 @@ public:
ArtPlacementMap putArtifact(ArtifactPosition pos, CArtifactInstance * art) override;//from CArtifactSet ArtPlacementMap putArtifact(ArtifactPosition pos, CArtifactInstance * art) override;//from CArtifactSet
void removeArtifact(ArtifactPosition pos) override; void removeArtifact(ArtifactPosition pos) override;
ArtBearer::ArtBearer bearerType() const override; //from CArtifactSet ArtBearer::ArtBearer bearerType() const override; //from CArtifactSet
virtual std::string nodeName() const override; //from CBonusSystemnode std::string nodeName() const override; //from CBonusSystemnode
void deserializationFix(); void deserializationFix();
PlayerColor getOwner() const override; PlayerColor getOwner() const override;
}; };

View File

@ -185,7 +185,7 @@ public:
//objects //objects
const CGObjectInstance * getObj(ObjectInstanceID objid, bool verbose = true) const override; const CGObjectInstance * getObj(ObjectInstanceID objid, bool verbose = true) const override;
virtual std::vector <const CGObjectInstance * > getBlockingObjs(int3 pos)const; virtual std::vector <const CGObjectInstance * > getBlockingObjs(int3 pos)const;
virtual std::vector <const CGObjectInstance * > getVisitableObjs(int3 pos, bool verbose = true) const override; std::vector <const CGObjectInstance * > getVisitableObjs(int3 pos, bool verbose = true) const override;
virtual std::vector <const CGObjectInstance * > getFlaggableObjects(int3 pos) const; virtual std::vector <const CGObjectInstance * > getFlaggableObjects(int3 pos) const;
virtual const CGObjectInstance * getTopObj (int3 pos) const; virtual const CGObjectInstance * getTopObj (int3 pos) const;
virtual PlayerColor getOwner(ObjectInstanceID heroID) const; virtual PlayerColor getOwner(ObjectInstanceID heroID) const;

View File

@ -150,17 +150,17 @@ public:
void battleNewRound(const BattleID & battleID) override; void battleNewRound(const BattleID & battleID) override;
void battleCatapultAttacked(const BattleID & battleID, const CatapultAttack & ca) override; void battleCatapultAttacked(const BattleID & battleID, const CatapultAttack & ca) override;
void battleStart(const BattleID & battleID, const CCreatureSet *army1, const CCreatureSet *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool side, bool replayAllowed) override; void battleStart(const BattleID & battleID, const CCreatureSet *army1, const CCreatureSet *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool side, bool replayAllowed) override;
virtual void battleStacksAttacked(const BattleID & battleID, const std::vector<BattleStackAttacked> & bsa, bool ranged) override; void battleStacksAttacked(const BattleID & battleID, const std::vector<BattleStackAttacked> & bsa, bool ranged) override;
void actionStarted(const BattleID & battleID, const BattleAction &action) override; void actionStarted(const BattleID & battleID, const BattleAction &action) override;
void battleNewRoundFirst(const BattleID & battleID) override; void battleNewRoundFirst(const BattleID & battleID) override;
void actionFinished(const BattleID & battleID, const BattleAction &action) override; void actionFinished(const BattleID & battleID, const BattleAction &action) override;
void battleStacksEffectsSet(const BattleID & battleID, const SetStackEffect & sse) override; void battleStacksEffectsSet(const BattleID & battleID, const SetStackEffect & sse) override;
virtual void battleObstaclesChanged(const BattleID & battleID, const std::vector<ObstacleChanges> & obstacles) override; void battleObstaclesChanged(const BattleID & battleID, const std::vector<ObstacleChanges> & obstacles) override;
virtual void battleStackMoved(const BattleID & battleID, const CStack * stack, std::vector<BattleHex> dest, int distance, bool teleport) override; void battleStackMoved(const BattleID & battleID, const CStack * stack, std::vector<BattleHex> dest, int distance, bool teleport) override;
void battleAttack(const BattleID & battleID, const BattleAttack *ba) override; void battleAttack(const BattleID & battleID, const BattleAttack *ba) override;
void battleSpellCast(const BattleID & battleID, const BattleSpellCast *sc) override; void battleSpellCast(const BattleID & battleID, const BattleSpellCast *sc) override;
void battleEnd(const BattleID & battleID, const BattleResult *br, QueryID queryID) override; void battleEnd(const BattleID & battleID, const BattleResult *br, QueryID queryID) override;
virtual void battleUnitsChanged(const BattleID & battleID, const std::vector<UnitChanges> & units) override; void battleUnitsChanged(const BattleID & battleID, const std::vector<UnitChanges> & units) override;
void saveGame(BinarySerializer & h) override; void saveGame(BinarySerializer & h) override;
void loadGame(BinaryDeserializer & h) override; void loadGame(BinaryDeserializer & h) override;

View File

@ -69,8 +69,8 @@ public:
RiverTypeHandler(); RiverTypeHandler();
virtual const std::vector<std::string> & getTypeNames() const override; const std::vector<std::string> & getTypeNames() const override;
virtual std::vector<JsonNode> loadLegacyData() override; std::vector<JsonNode> loadLegacyData() override;
}; };
VCMI_LIB_NAMESPACE_END VCMI_LIB_NAMESPACE_END

View File

@ -59,8 +59,8 @@ public:
RoadTypeHandler(); RoadTypeHandler();
virtual const std::vector<std::string> & getTypeNames() const override; const std::vector<std::string> & getTypeNames() const override;
virtual std::vector<JsonNode> loadLegacyData() override; std::vector<JsonNode> loadLegacyData() override;
}; };
VCMI_LIB_NAMESPACE_END VCMI_LIB_NAMESPACE_END

View File

@ -107,8 +107,8 @@ public:
const std::string & identifier, const std::string & identifier,
size_t index) override; size_t index) override;
virtual const std::vector<std::string> & getTypeNames() const override; const std::vector<std::string> & getTypeNames() const override;
virtual std::vector<JsonNode> loadLegacyData() override; std::vector<JsonNode> loadLegacyData() override;
}; };
VCMI_LIB_NAMESPACE_END VCMI_LIB_NAMESPACE_END

View File

@ -48,7 +48,7 @@ public:
} }
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override; std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
virtual std::string toString() const override; std::string toString() const override;
JsonNode toJsonNode() const override; JsonNode toJsonNode() const override;
}; };
@ -61,7 +61,7 @@ public:
} }
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override; std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
virtual std::string toString() const override; std::string toString() const override;
JsonNode toJsonNode() const override; JsonNode toJsonNode() const override;
}; };
@ -74,7 +74,7 @@ public:
} }
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override; std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
virtual std::string toString() const override; std::string toString() const override;
JsonNode toJsonNode() const override; JsonNode toJsonNode() const override;
}; };
@ -97,7 +97,7 @@ public:
} }
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override; std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
virtual std::string toString() const override; std::string toString() const override;
JsonNode toJsonNode() const override; JsonNode toJsonNode() const override;
}; };
@ -110,7 +110,7 @@ public:
} }
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus>& b, const CBonusSystemNode& context) const override; std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus>& b, const CBonusSystemNode& context) const override;
virtual std::string toString() const override; std::string toString() const override;
JsonNode toJsonNode() const override; JsonNode toJsonNode() const override;
}; };

View File

@ -34,7 +34,7 @@ public:
void initialize(const PathfinderOptions & options, const CGameState * gs) override; void initialize(const PathfinderOptions & options, const CGameState * gs) override;
virtual ~NodeStorage() = default; virtual ~NodeStorage() = default;
virtual std::vector<CGPathNode *> getInitialNodes() override; std::vector<CGPathNode *> getInitialNodes() override;
virtual std::vector<CGPathNode *> calculateNeighbours( virtual std::vector<CGPathNode *> calculateNeighbours(
const PathNodeInfo & source, const PathNodeInfo & source,

View File

@ -27,8 +27,8 @@ public:
std::vector<JsonNode> loadLegacyData() override; std::vector<JsonNode> loadLegacyData() override;
/// loads single object into game. Scope is namespace of this object, same as name of source mod /// loads single object into game. Scope is namespace of this object, same as name of source mod
virtual void loadObject(std::string scope, std::string name, const JsonNode & data) override; void loadObject(std::string scope, std::string name, const JsonNode & data) override;
virtual void loadObject(std::string scope, std::string name, const JsonNode & data, size_t index) override; void loadObject(std::string scope, std::string name, const JsonNode & data, size_t index) override;
void afterLoadFinalization() override; void afterLoadFinalization() override;