From 54bbef308ad90d707646b27a9ef96448ec39d0b8 Mon Sep 17 00:00:00 2001 From: Fabio Pedretti Date: Sun, 16 Aug 2026 17:48:38 +0200 Subject: [PATCH] Pathfinder: Remove unused ICmpPosition lookup in DistributeAround() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cmpPosition was declared but never read anywhere in the function, likely left over from an earlier refactor — each unit's own position is already fetched correctly inside the loop via unitPos. CmpPtr construction is a pure lookup with no side effects, so removing the unused instance doesn't change behaviour. --- source/simulation2/components/CCmpPathfinder.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/simulation2/components/CCmpPathfinder.cpp b/source/simulation2/components/CCmpPathfinder.cpp index eaca670a40..a9ba88bd44 100644 --- a/source/simulation2/components/CCmpPathfinder.cpp +++ b/source/simulation2/components/CCmpPathfinder.cpp @@ -925,7 +925,6 @@ std::vector CCmpPathfinder::DistributeAround(std::vector unitPositions; unitPositions.reserve(units.size()); - CmpPtr cmpPosition(GetSystemEntity()); for (entity_id_t unit : units) { CmpPtr unitPos(GetSimContext(), unit);