Sfoglia il codice sorgente

Compile fixes for gcc.

Frank Zago 16 anni fa
parent
commit
2bc0efe71f
3 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 7 7
      hch/CObjectHandler.cpp
  2. 1 1
      hch/CObjectHandler.h
  3. 1 1
      int3.h

+ 7 - 7
hch/CObjectHandler.cpp

@@ -39,8 +39,8 @@ DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mod
 extern CLodHandler * bitmaph;
 extern boost::rand48 ran;
 std::map <ui8, std::set <ui8> > CGKeys::playerKeyMap;
-std::map <si32, std::vector<CGMagi>> CGMagi::eyelist;
-std::map <ui32, std::vector <BankConfig>> banksInfo; //[index][preset], TODO: load it
+std::map <si32, std::vector<CGMagi> > CGMagi::eyelist;
+std::map <ui32, std::vector <BankConfig> > banksInfo; //[index][preset], TODO: load it
 
 struct BankConfig
 {
@@ -48,10 +48,10 @@ struct BankConfig
 	//std::string name;
 	ui8 chance;
 	ui8 upgradeChance;
-	std::vector< std::pair <ui16, ui32>> guards;
+	std::vector< std::pair <ui16, ui32> > guards;
 	ui32 combatValue;
 	std::map<ui8, si32> resources;
-	std::vector< std::pair <ui16, ui32>> creatures;
+	std::vector< std::pair <ui16, ui32> > creatures;
 	std::map<ui8, ui16> artifacts;
 	ui32 value;
 	ui32 rewardDifficulty; //?
@@ -3582,7 +3582,7 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
 				break;
 			case 4:
 			{
-				std::vector< std::pair <ui16, ui32>>::const_iterator it;
+				std::vector< std::pair <ui16, ui32> >::const_iterator it;
 				for (it = bc->guards.begin(); it != bc->guards.end(); it++)
 					ourArmy.setCreature (ourArmy.slots.size() + 1, it->first, it->second );
 			}
@@ -3644,7 +3644,7 @@ void CBank::endBattle (const BattleResult *result)
 			cb->giveHeroArtifact (*it, cb->getSelectedHero() ,-2);
 		}
 		CCreatureSet ourArmy;
-		for (std::vector< std::pair <ui16, ui32>>::iterator it = bc->creatures.begin(); it != bc->creatures.end(); it++)
+		for (std::vector< std::pair <ui16, ui32> >::iterator it = bc->creatures.begin(); it != bc->creatures.end(); it++)
 		{
 			int slot = ourArmy.getSlotFor (it->second);
 			ourArmy.slots[slot] = *it; //assuming we're not going to add multiple stacks of same creature
@@ -3965,4 +3965,4 @@ void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const
 		ow.window = OpenWindow::SHIPYARD_WINDOW;
 		cb->sendAndApply(&ow);
 	}
-}
+}

+ 1 - 1
hch/CObjectHandler.h

@@ -896,7 +896,7 @@ public:
 class DLL_EXPORT CGMagi : public CGObjectInstance
 {
 public:
-	static std::map <si32, std::vector<CGMagi>> eyelist; //[subID][id], supports multiple sets as in H5
+	static std::map <si32, std::vector<CGMagi> > eyelist; //[subID][id], supports multiple sets as in H5
 
 	void initObj();
 	void onHeroVisit(const CGHeroInstance * h) const;

+ 1 - 1
int3.h

@@ -18,7 +18,7 @@ class CCreature;
 class CCreatureSet //seven combined creatures
 {
 public:
-	std::map<si32, std::pair<ui32,si32>> slots; //slots[slot_id]=> pair(creature_id,creature_quantity)
+	std::map<si32, std::pair<ui32,si32> > slots; //slots[slot_id]=> pair(creature_id,creature_quantity)
 	bool formation; //false - wide, true - tight
 	bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7
 	{