浏览代码

Minor (unnecessary copying of vector)

Michał W. Urbańczyk 15 年之前
父节点
当前提交
70bfd7ceb7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/CGameHandler.cpp

+ 1 - 1
server/CGameHandler.cpp

@@ -938,7 +938,7 @@ void CGameHandler::setPortalDwelling(const CGTownInstance * town, bool forced=fa
 			ssi.creatures = town->creatures;
 			ssi.creatures[CREATURES_PER_TOWN].second.clear();//remove old one
 			
-			std::vector<CGDwelling *> dwellings = gs->getPlayer(town->tempOwner)->dwellings;
+			const std::vector<CGDwelling *> &dwellings = gs->getPlayer(town->tempOwner)->dwellings;
 			if (dwellings.empty())//no dwellings - just remove
 			{
 				sendAndApply(&ssi);