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); } }