From 161eb982b52cf0267d103b54a2d9e5ec50b403f4 Mon Sep 17 00:00:00 2001 From: Antoine Lavenant Date: Fri, 31 May 2024 18:08:37 +0200 Subject: [PATCH] ajout assert --- src/filter_grid_decimation/GridDecimationFilter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filter_grid_decimation/GridDecimationFilter.cpp b/src/filter_grid_decimation/GridDecimationFilter.cpp index e82acd5..f01fab6 100755 --- a/src/filter_grid_decimation/GridDecimationFilter.cpp +++ b/src/filter_grid_decimation/GridDecimationFilter.cpp @@ -80,9 +80,8 @@ void GridDecimationFilter::processOne(BOX2D bounds, PointRef& point, PointViewPt double y = point.getFieldAs(Dimension::Id::Y); int id = point.getFieldAs(Dimension::Id::PointId); - // if x==xmax of the cell, the point are in the bottom cell - // if y==ymax of the cell, the point are in the right cell - + // if x==(xmax of the cell), the point are in the bottom cell + // if y==(ymax of the cell), the point are in the right cell double d_width_pt = (x - bounds.minx) / m_args->m_edgeLength; double d_height_pt = (y - bounds.miny) / m_args->m_edgeLength; @@ -90,6 +89,7 @@ void GridDecimationFilter::processOne(BOX2D bounds, PointRef& point, PointViewPt int height = static_cast(d_height_pt); auto mptRefid = this->grid.find( std::make_pair(width,height) ); + assert( mptRefid != this->grid.end() ); auto ptRefid = mptRefid->second; if (ptRefid==-1)