Преглед на файлове

- Fixed compilation errors on clang
- Removed compiler warnings of unused variables

beegee1 преди 12 години
родител
ревизия
39d3102905
променени са 5 файла, в които са добавени 13 реда и са изтрити 13 реда
  1. 4 4
      AI/VCAI/Goals.h
  2. 2 2
      lib/rmg/CZoneGraphGenerator.cpp
  3. 2 2
      lib/rmg/CZoneGraphGenerator.h
  4. 2 2
      lib/rmg/CZonePlacer.cpp
  5. 3 3
      lib/rmg/CZonePlacer.h

+ 4 - 4
AI/VCAI/Goals.h

@@ -114,7 +114,7 @@ public:
 	}
 };
 
-template <typename T = CGoal> class CGoal : public AbstractGoal
+template <typename T> class CGoal : public AbstractGoal
 {
 public:
 	CGoal<T> (EGoals goal = INVALID) : AbstractGoal (goal)
@@ -146,11 +146,11 @@ public:
 };
 
 //There seems to be some ambiguity on these two, template function keeps form consitent
-template <typename T> shared_ptr<CGoal<T>> sptr(CGoal<T>& tmp)
+template <typename T> shared_ptr<CGoal<T>> sptr(const CGoal<T> & tmp)
 {
 	return make_shared<CGoal<T>> (tmp);
 }
-template <typename T> shared_ptr<CGoal<T>> sptr(T& obj)
+template <typename T> shared_ptr<CGoal<T>> sptr(const T & obj)
 {
 	return make_shared<CGoal<T>> (obj);
 }
@@ -304,4 +304,4 @@ class CIssueCommand : public CGoal<CIssueCommand>
 	TSubgoal whatToDoToAchieve() override;
 };
 
-}
+}

+ 2 - 2
lib/rmg/CZoneGraphGenerator.cpp

@@ -12,7 +12,7 @@
 #include "StdInc.h"
 #include "CZoneGraphGenerator.h"
 
-CZoneCell::CZoneCell(const CRmgTemplateZone * zone) : zone(zone)
+CZoneCell::CZoneCell(const CRmgTemplateZone * zone)// : zone(zone)
 {
 
 }
@@ -23,7 +23,7 @@ CZoneGraph::CZoneGraph()
 
 }
 
-CZoneGraphGenerator::CZoneGraphGenerator() : gen(nullptr)
+CZoneGraphGenerator::CZoneGraphGenerator()// : gen(nullptr)
 {
 
 }

+ 2 - 2
lib/rmg/CZoneGraphGenerator.h

@@ -21,7 +21,7 @@ public:
 	explicit CZoneCell(const CRmgTemplateZone * zone);
 
 private:
-	const CRmgTemplateZone * zone;
+	//const CRmgTemplateZone * zone;
 
 	//TODO additional data
 };
@@ -44,5 +44,5 @@ public:
 
 private:
 	unique_ptr<CZoneGraph> graph;
-	CRandomGenerator * gen;
+	//CRandomGenerator * gen;
 };

+ 2 - 2
lib/rmg/CZonePlacer.cpp

@@ -14,12 +14,12 @@
 
 #include "CZoneGraphGenerator.h"
 
-CPlacedZone::CPlacedZone(const CRmgTemplateZone * zone) : zone(zone)
+CPlacedZone::CPlacedZone(const CRmgTemplateZone * zone)// : zone(zone)
 {
 
 }
 
-CZonePlacer::CZonePlacer() : map(nullptr), gen(nullptr)
+CZonePlacer::CZonePlacer()// : map(nullptr), gen(nullptr)
 {
 
 }

+ 3 - 3
lib/rmg/CZonePlacer.h

@@ -22,7 +22,7 @@ public:
 	explicit CPlacedZone(const CRmgTemplateZone * zone);
 
 private:
-	const CRmgTemplateZone * zone;
+	//const CRmgTemplateZone * zone;
 
 	//TODO exact outline data of zone
 	//TODO perhaps further zone data, guards, obstacles, etc...
@@ -39,7 +39,7 @@ public:
 	void placeZones(CMap * map, unique_ptr<CZoneGraph> graph, CRandomGenerator * gen);
 
 private:
-	CMap * map;
+	//CMap * map;
 	unique_ptr<CZoneGraph> graph;
-	CRandomGenerator * gen;
+	//CRandomGenerator * gen;
 };