From cd9c081a0eaea9e70506ebba6ce0bd68c749f63b Mon Sep 17 00:00:00 2001 From: siferati Date: Wed, 14 Apr 2021 21:30:46 +0100 Subject: [PATCH] changed loop to use iterators --- src/spatio_temporal_voxel_layer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spatio_temporal_voxel_layer.cpp b/src/spatio_temporal_voxel_layer.cpp index 16ab2490..8f59a054 100644 --- a/src/spatio_temporal_voxel_layer.cpp +++ b/src/spatio_temporal_voxel_layer.cpp @@ -684,9 +684,10 @@ void SpatioTemporalVoxelLayer::UpdateROSCostmap( \ } } - for (const auto& cell: cleared_cells) + std::unordered_set::iterator cell; + for (cell = cleared_cells.begin(); cell != cleared_cells.end(); ++cell) { - touch(cell.x, cell.y, min_x, min_y, max_x, max_y); + touch(cell->x, cell->y, min_x, min_y, max_x, max_y); } }