Fixes by clang-tidy

This commit is contained in:
magnesj 2024-04-18 02:34:08 +00:00 committed by Magne Sjaastad
parent e77b4f9e3b
commit 932464ea55

View File

@ -803,7 +803,7 @@ void RimPolygonFilter::updateCells()
} }
// We need at least three points to make a closed polygon, or just 2 for a polyline // We need at least three points to make a closed polygon, or just 2 for a polyline
if ( ( !isPolygonClosed() && ( points.size() < 1 ) ) || ( isPolygonClosed() && ( points.size() < 3 ) ) ) return; if ( ( !isPolygonClosed() && ( points.empty() ) ) || ( isPolygonClosed() && ( points.size() < 3 ) ) ) return;
// make sure first and last point is the same (req. by closed polygon methods used later) // make sure first and last point is the same (req. by closed polygon methods used later)
if ( isPolygonClosed() ) points.push_back( points.front() ); if ( isPolygonClosed() ) points.push_back( points.front() );