Skip to content

Commit

Permalink
Fix illegal bounds change warning. (#64)
Browse files Browse the repository at this point in the history
Co-authored-by: João Aguizo <[email protected]>
  • Loading branch information
joao-aguizo and João Aguizo authored Jul 18, 2023
1 parent 2f6b060 commit fdb6244
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polygon_layer/src/polygon_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ void PolygonLayer::updateBounds(double robot_x, double robot_y, double robot_yaw
if (!activated_ || !enabled_ || polygon_.polygon.points.empty())
{ return; }

*min_x = min_x_;
*min_y = min_y_;
*max_x = max_x_;
*max_y = max_y_;
*min_x = std::min(*min_x, min_x_);
*min_y = std::min(*min_y, min_y_);
*max_x = std::max(*max_x, max_x_);
*max_y = std::max(*max_y, max_y_);
MarkCell marker(costmap_, LETHAL_OBSTACLE);
for (unsigned int i = 0, j = polygon_.polygon.points.size()-1; i < polygon_.polygon.points.size(); j = i++)
{
Expand Down

0 comments on commit fdb6244

Please sign in to comment.