Browse Source

Update CObjectHandler.cpp

Changed type of "for" variable to auto in dailyIncome
Macron1Robot 11 years ago
parent
commit
cd7ec5716f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/CObjectHandler.cpp

+ 2 - 2
lib/CObjectHandler.cpp

@@ -2274,11 +2274,11 @@ TResources CGTownInstance::dailyIncome() const
 {
 	TResources ret;
 
-	for (TPairCBuilding p : town->buildings)
+	for (auto & p : town->buildings) 
 	{ 
 		BuildingID buildingUpgrade;
 
-		for (TPairCBuilding p2 : town->buildings)
+		for (auto & p2 : town->buildings) 
 		{ 
 			if (p2.second->upgrade == p.first)
 			{