1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Remove excessive copies of large objects

This commit is contained in:
Ivan Savenko 2024-07-03 21:14:22 +00:00
parent 95d8e447b2
commit 1468abb8a0
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ void GraphPaths::calculatePaths(const CGHeroInstance * targetHero, const Nullkil
targetNode.specialAction = compositeAction;
auto targetGraphNode = graph.getNode(target);
const auto & targetGraphNode = graph.getNode(target);
if(targetGraphNode.objID.hasValue())
{

View File

@ -40,7 +40,7 @@ void NodeStorage::initialize(const PathfinderOptions & options, const CGameState
{
for(pos.y=0; pos.y < sizes.y; ++pos.y)
{
const TerrainTile tile = gs->map->getTile(pos);
const TerrainTile & tile = gs->map->getTile(pos);
if(tile.terType->isWater())
{
resetTile(pos, ELayer::SAIL, PathfinderUtil::evaluateAccessibility<ELayer::SAIL>(pos, tile, fow, player, gs));