1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Nullkiller: initial cleanup of unused code

This commit is contained in:
Andrii Danylchenko
2019-12-15 15:47:21 +02:00
committed by Andrii Danylchenko
parent 5344df51c6
commit af0dcf97c4
67 changed files with 378 additions and 2913 deletions

View File

@@ -14,7 +14,7 @@
namespace AIPathfinding
{
Goals::TSubgoal BattleAction::whatToDo(const HeroPtr & hero) const
Goals::TSubgoal BattleAction::whatToDo(const CGHeroInstance * hero) const
{
return Goals::sptr(Goals::VisitTile(targetTile).sethero(hero));
}

View File

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

View File

@@ -17,7 +17,7 @@
namespace AIPathfinding
{
Goals::TSubgoal BuildBoatAction::whatToDo(const HeroPtr & hero) const
Goals::TSubgoal BuildBoatAction::whatToDo(const CGHeroInstance * hero) const
{
return Goals::sptr(Goals::BuildBoat(shipyard));
}
@@ -27,7 +27,7 @@ namespace AIPathfinding
return sourceActor->resourceActor;
}
Goals::TSubgoal SummonBoatAction::whatToDo(const HeroPtr & hero) const
Goals::TSubgoal SummonBoatAction::whatToDo(const CGHeroInstance * hero) const
{
return Goals::sptr(Goals::AdventureSpellCast(hero, SpellID::SUMMON_BOAT));
}

View File

@@ -25,7 +25,7 @@ namespace AIPathfinding
class SummonBoatAction : public VirtualBoatAction
{
public:
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
virtual Goals::TSubgoal whatToDo(const CGHeroInstance * hero) const override;
virtual void applyOnDestination(
const CGHeroInstance * hero,
@@ -53,7 +53,7 @@ namespace AIPathfinding
{
}
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const override;
virtual Goals::TSubgoal whatToDo(const CGHeroInstance * hero) const override;
virtual const ChainActor * getActor(const ChainActor * sourceActor) const override;
};

View File

@@ -23,7 +23,7 @@ public:
return true;
}
virtual Goals::TSubgoal whatToDo(const HeroPtr & hero) const = 0;
virtual Goals::TSubgoal whatToDo(const CGHeroInstance * hero) const = 0;
virtual void applyOnDestination(
const CGHeroInstance * hero,

View File

@@ -16,7 +16,7 @@
using namespace AIPathfinding;
Goals::TSubgoal TownPortalAction::whatToDo(const HeroPtr & hero) const
Goals::TSubgoal TownPortalAction::whatToDo(const CGHeroInstance * hero) const
{
const CGTownInstance * targetTown = target; // const pointer is not allowed in settown

View File

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