Swap outside critical section

pull/541/head
elsid 6 years ago
parent 8d2af94b75
commit 849f2078c1
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -61,8 +61,8 @@ namespace DetourNavigator
for (const auto& tile : currentTiles)
if (!newTiles.count(tile) && removeTile(id, tile, tiles.get()))
changedTiles.push_back(tile);
std::swap(currentTiles, newTiles);
}
std::swap(currentTiles, newTiles);
if (!changedTiles.empty())
++mRevision;
return changedTiles;

Loading…
Cancel
Save