瀏覽代碼

reverted changes back

KroArtem 11 年之前
父節點
當前提交
6da79d01d7
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      lib/Connection.cpp
  2. 2 2
      lib/rmg/CRmgTemplateZone.cpp

+ 1 - 1
lib/Connection.cpp

@@ -478,7 +478,7 @@ std::vector<CTypeList::TypeInfoPtr> CTypeList::castSequence(TypeInfoPtr from, Ty
 		std::map<TypeInfoPtr, TypeInfoPtr> previous;
 		std::queue<TypeInfoPtr> q;
 		q.push(to);
-		while(!q.empty())
+		while(q.size())
 		{
 			auto typeNode = q.front();
 			q.pop();

+ 2 - 2
lib/rmg/CRmgTemplateZone.cpp

@@ -430,7 +430,7 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
 	}
 	assert (clearedTiles.size()); //this should come from zone connections
 
-	while (!possibleTiles.empty())
+	while (possibleTiles.size())
 	{
 		//link tiles in random order
 		std::vector<int3> tilesToMakePath(possibleTiles.begin(), possibleTiles.end());
@@ -811,7 +811,7 @@ bool CRmgTemplateZone::createTreasurePile (CMapGenerator* gen, int3 &pos, float
 			}
 	}
 
-	if (!treasures.empty())
+	if (!treasures.size())
 	{
 		//find object closest to zone center, then connect it to the middle of the zone
 		int3 closestFreeTile (-1,-1,-1);