فهرست منبع

Update CObjectHandler.cpp

Changed type of "for" variable to auto in dailyIncome
Macron1Robot 11 سال پیش
والد
کامیت
cd7ec5716f
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      lib/CObjectHandler.cpp

+ 2 - 2
lib/CObjectHandler.cpp

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