mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Minor (unnecessary copying of vector)
This commit is contained in:
parent
49b7fc590d
commit
70bfd7ceb7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user