mateuszb 12 anos atrás
pai
commit
6ff7d61b91
2 arquivos alterados com 3 adições e 3 exclusões
  1. 1 1
      lib/CGameState.cpp
  2. 2 2
      lib/IGameCallback.cpp

+ 1 - 1
lib/CGameState.cpp

@@ -3282,7 +3282,7 @@ bool CPathfinder::goodForLandSeaTransition()
 	return true;
 }
 
-CPathfinder::CPathfinder(CPathsInfo &_out, CGameState *_gs, const CGHeroInstance *_hero) : CGameInfoCallback(_gs, -1), out(_out), hero(_hero), FoW(getPlayerTeam(hero->tempOwner)->fogOfWarMap)
+CPathfinder::CPathfinder(CPathsInfo &_out, CGameState *_gs, const CGHeroInstance *_hero) : CGameInfoCallback(_gs, boost::optional<TPlayerColor>()), out(_out), hero(_hero), FoW(getPlayerTeam(hero->tempOwner)->fogOfWarMap)
 {
 	useSubterraneanGates = true;
 	allowEmbarkAndDisembark = true;

+ 2 - 2
lib/IGameCallback.cpp

@@ -711,9 +711,9 @@ std::vector < const CGTownInstance *> CPlayerSpecificInfoCallback::getTownsInfo(
 {
 	//boost::shared_lock<boost::shared_mutex> lock(*gs->mx);
 	std::vector < const CGTownInstance *> ret = std::vector < const CGTownInstance *>();
-	BOOST_FOREACH(auto i, gs->players)
+	BOOST_FOREACH(const auto & i, gs->players)
 	{
-		BOOST_FOREACH(auto town, i.second.towns)
+		BOOST_FOREACH(const auto & town, i.second.towns)
 		{
 			if (i.first==player || (isVisible(town, player) && !onlyOur))
 			{