Browse Source

Review suggestion

Ivan Savenko 1 year ago
parent
commit
fd499e318d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/rmg/CMapGenerator.cpp

+ 5 - 0
lib/rmg/CMapGenerator.cpp

@@ -499,8 +499,13 @@ const std::vector<HeroTypeID> CMapGenerator::getAllPossibleHeroes() const
 
 		bool heroUsedAsStarting = false;
 		for (auto const & player : map->getMapGenOptions().getPlayersSettings())
+		{
 			if (player.second.getStartingHero() == hero)
+			{
 				heroUsedAsStarting = true;
+				break;
+			}
+		}
 
 		if (heroUsedAsStarting)
 			continue;