Browse Source

Fix gcc-14 build

Ivan Savenko 1 year ago
parent
commit
cba49a9952
2 changed files with 12 additions and 9 deletions
  1. 8 6
      AI/Nullkiller/Goals/CGoal.h
  2. 4 3
      AI/VCAI/Goals/CGoal.h

+ 8 - 6
AI/Nullkiller/Goals/CGoal.h

@@ -18,10 +18,11 @@ class AIGateway;
 
 
 namespace Goals
 namespace Goals
 {
 {
-	template<typename T> class DLL_EXPORT CGoal : public AbstractGoal
+	template<typename T>
+	class DLL_EXPORT CGoal : public AbstractGoal
 	{
 	{
 	public:
 	public:
-		CGoal<T>(EGoals goal = INVALID) : AbstractGoal(goal)
+		CGoal(EGoals goal = INVALID) : AbstractGoal(goal)
 		{
 		{
 			isAbstract = true;
 			isAbstract = true;
 			value = 0;
 			value = 0;
@@ -32,7 +33,7 @@ namespace Goals
 			town = nullptr;
 			town = nullptr;
 		}
 		}
 
 
-		CGoal<T> * clone() const override
+		CGoal * clone() const override
 		{
 		{
 			return new T(static_cast<T const &>(*this)); //casting enforces template instantiation
 			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:
 	public:
-		ElementarGoal<T>(EGoals goal = INVALID) : CGoal<T>(goal), ITask()
+		ElementarGoal(EGoals goal = INVALID) : CGoal<T>(goal), ITask()
 		{
 		{
 			AbstractGoal::isAbstract = false;
 			AbstractGoal::isAbstract = false;
 		}
 		}
 
 
-		ElementarGoal<T>(const ElementarGoal<T> & other) : CGoal<T>(other), ITask(other)
+		ElementarGoal(const ElementarGoal<T> & other) : CGoal<T>(other), ITask(other)
 		{
 		{
 		}
 		}
 
 

+ 4 - 3
AI/VCAI/Goals/CGoal.h

@@ -18,10 +18,11 @@ class VCAI;
 
 
 namespace Goals
 namespace Goals
 {
 {
-	template<typename T> class DLL_EXPORT CGoal : public AbstractGoal
+	template<typename T>
+	class DLL_EXPORT CGoal : public AbstractGoal
 	{
 	{
 	public:
 	public:
-		CGoal<T>(EGoals goal = INVALID) : AbstractGoal(goal)
+		CGoal(EGoals goal = INVALID) : AbstractGoal(goal)
 		{
 		{
 			priority = 0;
 			priority = 0;
 			isElementar = false;
 			isElementar = false;
@@ -56,7 +57,7 @@ namespace Goals
 			return f->evaluate(static_cast<T &>(*this)); //casting enforces template instantiation
 			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
 			return new T(static_cast<T const &>(*this)); //casting enforces template instantiation
 		}
 		}