Bläddra i källkod

Several compile/link fixes.

Frank Zago 15 år sedan
förälder
incheckning
4b8be22fb6
5 ändrade filer med 11 tillägg och 6 borttagningar
  1. 3 1
      client/CPreGame.cpp
  2. 1 1
      client/Client.cpp
  3. 2 1
      lib/CGameState.cpp
  4. 1 1
      lib/Connection.h
  5. 4 2
      server/CGameHandler.cpp

+ 3 - 1
client/CPreGame.cpp

@@ -102,6 +102,8 @@ static void clearInfo()
 	playerNames.clear();
 	playerNames.clear();
 }
 }
 
 
+template <typename T> class CApplyOnPG;
+
 class CBaseForPGApply
 class CBaseForPGApply
 {
 {
 public:
 public:
@@ -123,7 +125,7 @@ public:
 	}
 	}
 };
 };
 
 
-CApplier<CBaseForPGApply> *applier = NULL;
+static CApplier<CBaseForPGApply> *applier = NULL;
 
 
 void CMapInfo::countPlayers()
 void CMapInfo::countPlayers()
 {
 {

+ 1 - 1
client/Client.cpp

@@ -75,7 +75,7 @@ public:
 	}
 	}
 };
 };
 
 
-CApplier<CBaseForCLApply> *applier = NULL;
+static CApplier<CBaseForCLApply> *applier = NULL;
 
 
 void CClient::init()
 void CClient::init()
 {
 {

+ 2 - 1
lib/CGameState.cpp

@@ -60,6 +60,7 @@ void foofoofoo()
 	registerTypes((CTypeList&)*ccc);
 	registerTypes((CTypeList&)*ccc);
 }
 }
 
 
+template <typename T> class CApplyOnGS;
 
 
 class CBaseForGSApply
 class CBaseForGSApply
 {
 {
@@ -85,7 +86,7 @@ public:
 	}
 	}
 };
 };
 
 
-CApplier<CBaseForGSApply> *applierGs = NULL;
+static CApplier<CBaseForGSApply> *applierGs = NULL;
 
 
 class IObjectCaller
 class IObjectCaller
 {
 {

+ 1 - 1
lib/Connection.h

@@ -876,7 +876,7 @@ public:
 
 
 	~CApplier()
 	~CApplier()
 	{
 	{
-		std::map<ui16,T*>::iterator iter;
+		typename std::map<ui16, T*>::iterator iter;
 
 
 		for(iter = apps.begin(); iter != apps.end(); iter++)
 		for(iter = apps.begin(); iter != apps.end(); iter++)
 			delete iter->second;
 			delete iter->second;

+ 4 - 2
server/CGameHandler.cpp

@@ -60,6 +60,7 @@ CondSh<BattleResult *> battleResult(NULL);
 std::ptrdiff_t randomizer (ptrdiff_t i) {return rand();}
 std::ptrdiff_t randomizer (ptrdiff_t i) {return rand();}
 std::ptrdiff_t (*p_myrandom)(std::ptrdiff_t) = randomizer;
 std::ptrdiff_t (*p_myrandom)(std::ptrdiff_t) = randomizer;
 
 
+template <typename T> class CApplyOnGH;
 
 
 class CBaseForGHApply
 class CBaseForGHApply
 {
 {
@@ -71,6 +72,7 @@ public:
 		return new CApplyOnGH<U>;
 		return new CApplyOnGH<U>;
 	}
 	}
 };
 };
+
 template <typename T> class CApplyOnGH : public CBaseForGHApply
 template <typename T> class CApplyOnGH : public CBaseForGHApply
 {
 {
 public:
 public:
@@ -82,7 +84,7 @@ public:
 	}
 	}
 };
 };
 
 
-CApplier<CBaseForGHApply> *applier = NULL;
+static CApplier<CBaseForGHApply> *applier = NULL;
 
 
 CMP_stack cmpst ;
 CMP_stack cmpst ;
 
 
@@ -5220,4 +5222,4 @@ bool CGameHandler::sacrificeArtifact(const IMarket * m, const CGHeroInstance * h
 	m->getOffer(artID, 0, dmp, expToGive, ARTIFACT_EXP);
 	m->getOffer(artID, 0, dmp, expToGive, ARTIFACT_EXP);
 	changePrimSkill(hero->id, 4, expToGive);
 	changePrimSkill(hero->id, 4, expToGive);
 	return true;
 	return true;
-}
+}