mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Fix gcc-14 build
This commit is contained in:
parent
dd7991b70f
commit
cba49a9952
@ -18,10 +18,11 @@ class AIGateway;
|
||||
|
||||
namespace Goals
|
||||
{
|
||||
template<typename T> class DLL_EXPORT CGoal : public AbstractGoal
|
||||
template<typename T>
|
||||
class DLL_EXPORT CGoal : public AbstractGoal
|
||||
{
|
||||
public:
|
||||
CGoal<T>(EGoals goal = INVALID) : AbstractGoal(goal)
|
||||
CGoal(EGoals goal = INVALID) : AbstractGoal(goal)
|
||||
{
|
||||
isAbstract = true;
|
||||
value = 0;
|
||||
@ -32,7 +33,7 @@ namespace Goals
|
||||
town = nullptr;
|
||||
}
|
||||
|
||||
CGoal<T> * clone() const override
|
||||
CGoal * clone() const override
|
||||
{
|
||||
return new T(static_cast<T const &>(*this)); //casting enforces template instantiation
|
||||
}
|
||||
@ -70,15 +71,16 @@ namespace Goals
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T> class DLL_EXPORT ElementarGoal : public CGoal<T>, public ITask
|
||||
template<typename T>
|
||||
class DLL_EXPORT ElementarGoal : public CGoal<T>, public ITask
|
||||
{
|
||||
public:
|
||||
ElementarGoal<T>(EGoals goal = INVALID) : CGoal<T>(goal), ITask()
|
||||
ElementarGoal(EGoals goal = INVALID) : CGoal<T>(goal), ITask()
|
||||
{
|
||||
AbstractGoal::isAbstract = false;
|
||||
}
|
||||
|
||||
ElementarGoal<T>(const ElementarGoal<T> & other) : CGoal<T>(other), ITask(other)
|
||||
ElementarGoal(const ElementarGoal<T> & other) : CGoal<T>(other), ITask(other)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,11 @@ class VCAI;
|
||||
|
||||
namespace Goals
|
||||
{
|
||||
template<typename T> class DLL_EXPORT CGoal : public AbstractGoal
|
||||
template<typename T>
|
||||
class DLL_EXPORT CGoal : public AbstractGoal
|
||||
{
|
||||
public:
|
||||
CGoal<T>(EGoals goal = INVALID) : AbstractGoal(goal)
|
||||
CGoal(EGoals goal = INVALID) : AbstractGoal(goal)
|
||||
{
|
||||
priority = 0;
|
||||
isElementar = false;
|
||||
@ -56,7 +57,7 @@ namespace Goals
|
||||
return f->evaluate(static_cast<T &>(*this)); //casting enforces template instantiation
|
||||
}
|
||||
|
||||
CGoal<T> * clone() const override
|
||||
CGoal * clone() const override
|
||||
{
|
||||
return new T(static_cast<T const &>(*this)); //casting enforces template instantiation
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user