DomainIndex: Fix benign loop variable in closure hazard

This never outlived a single iteration of the neighbors loop.
This commit is contained in:
Chris Forbes
2014-10-07 18:30:23 +13:00
parent 3360b11962
commit ea475ed39b

View File

@@ -89,7 +89,8 @@ namespace OpenRA.Mods.RA
foreach (var cell in dirtyCells)
{
// Select all neighbors inside the map boundries
var neighbors = CVec.directions.Select(d => d + cell)
var thisCell = cell; // benign closure hazard
var neighbors = CVec.directions.Select(d => d + thisCell)
.Where(c => map.Contains(c));
var found = false;