소스 검색

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);