mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-13 22:06:58 +02:00
Use reference
This commit is contained in:
parent
6cd19b81dd
commit
69ff1734b0
@ -275,7 +275,7 @@ const rmg::Area & Object::getBlockVisitableArea() const
|
|||||||
if(dInstances.empty())
|
if(dInstances.empty())
|
||||||
return dBlockVisitableCache;
|
return dBlockVisitableCache;
|
||||||
|
|
||||||
for(const auto i : dInstances)
|
for(const auto & i : dInstances)
|
||||||
{
|
{
|
||||||
// FIXME: Account for blockvis objects with multiple visitable tiles
|
// FIXME: Account for blockvis objects with multiple visitable tiles
|
||||||
if (i.isBlockedVisitable())
|
if (i.isBlockedVisitable())
|
||||||
@ -290,7 +290,7 @@ const rmg::Area & Object::getRemovableArea() const
|
|||||||
if(dInstances.empty())
|
if(dInstances.empty())
|
||||||
return dRemovableAreaCache;
|
return dRemovableAreaCache;
|
||||||
|
|
||||||
for(const auto i : dInstances)
|
for(const auto & i : dInstances)
|
||||||
{
|
{
|
||||||
if (i.isRemovable())
|
if (i.isRemovable())
|
||||||
dRemovableAreaCache.unite(i.getBlockedArea());
|
dRemovableAreaCache.unite(i.getBlockedArea());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user