Bladeren bron

Compile fixes for gcc, as per http://forum.vcmi.eu/viewtopic.php?p=9638#9638

Michał W. Urbańczyk 12 jaren geleden
bovenliggende
commit
06f0a29b31
3 gewijzigde bestanden met toevoegingen van 5 en 4 verwijderingen
  1. 3 2
      client/CCastleInterface.cpp
  2. 1 1
      client/battle/CBattleInterface.cpp
  3. 1 1
      lib/CGameInterface.cpp

+ 3 - 2
client/CCastleInterface.cpp

@@ -825,8 +825,9 @@ void CCastleBuildings::enterTownHall()
 		if(!vstd::contains(town->forbiddenBuildings, BuildingID::GRAIL))
 		{
 			LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[597], //Do you wish this to be the permanent home of the Grail?
-			                            boost::bind(&CCallback::buildBuilding, LOCPLINT->cb, town, BuildingID::GRAIL),
-			                            boost::bind(&CCastleBuildings::openTownHall, this), true);
+										[&]{ LOCPLINT->cb->buildBuilding(town, BuildingID::GRAIL); },
+										[&]{ openTownHall(); },
+										true);
 		}
 		else
 		{

+ 1 - 1
client/battle/CBattleInterface.cpp

@@ -117,7 +117,7 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
 	else if(defenderInt && defenderInt->cb->battleGetTacticDist())
 		tacticianInterface = defenderInt;
 
-	tacticsMode = tacticianInterface;  //if we found interface of player with tactics, then enter tactics mode
+	tacticsMode = static_cast<bool>(tacticianInterface);  //if we found interface of player with tactics, then enter tactics mode
 
 	//create stack queue
 	bool embedQueue = screen->h < 700;

+ 1 - 1
lib/CGameInterface.cpp

@@ -217,7 +217,7 @@ void CAdventureAI::saveGame(COSer<CSaveFile> &h, const int version) /*saving */
 {
 	LOG_TRACE_PARAMS(logAi, "version '%i'", version);
 	CGlobalAI::saveGame(h, version);
-	bool hasBattleAI = battleAI;
+	bool hasBattleAI = static_cast<bool>(battleAI);
 	h << hasBattleAI;
 	if(hasBattleAI)
 	{