mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Pathfinder: Remove unused ICmpPosition lookup in DistributeAround()
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.
This commit is contained in:
@@ -925,7 +925,6 @@ std::vector<CFixedVector2D> CCmpPathfinder::DistributeAround(std::vector<entity_
|
||||
std::vector<CFixedVector2D> unitPositions;
|
||||
unitPositions.reserve(units.size());
|
||||
|
||||
CmpPtr<ICmpPosition> cmpPosition(GetSystemEntity());
|
||||
for (entity_id_t unit : units)
|
||||
{
|
||||
CmpPtr<ICmpPosition> unitPos(GetSimContext(), unit);
|
||||
|
||||
Reference in New Issue
Block a user