grid_map
grid_map copied to clipboard
fix(SpiralIterator): Avoid improper use of '++', which may cause prog…
This PR addresses an issue in the SpiralIterator::operator++() function where the pop_back() method was called on an empty pointsRing_ container, leading to undefined behavior. The fix involves adding a check to ensure that pointsRing_ is not empty before attempting to call pop_back(). This change prevents potential crashes and ensures the iterator operates correctly even when the container is empty. This change ensures the iterator’s robustness and prevents potential runtime errors.
@maximilianwulf Please merge this fix
This has been merged into all of the maintained ROS 2 branches.