#10649 Fwk: Use collection.empty() instead of comparing with size

This commit is contained in:
Kristian Bendiksen committed 2023-09-27 10:16:37 +02:00
1 parent a4def5d407
commit 98796b0dd9
41 files changed
+77 -77

No files matched your search

@@ -113,7 +113,7 @@ void CellRangeFilter::addCellExclude( size_t i, size_t j, size_t k, bool applyTo
//--------------------------------------------------------------------------------------------------
bool CellRangeFilter::isCellVisible( size_t i, size_t j, size_t k, bool isInSubGridArea ) const
{
if ( m_includeRanges.size() == 0 )
if ( m_includeRanges.empty() )
{
return false;
}
@@ -159,7 +159,7 @@ bool CellRangeFilter::isCellExcluded( size_t i, size_t j, size_t k, bool isInSub
//--------------------------------------------------------------------------------------------------
bool CellRangeFilter::hasIncludeRanges() const
{
if ( m_includeRanges.size() > 0 )
if ( !m_includeRanges.empty() )
return true;
else
return false;
@@ -411,7 +411,7 @@ void StructGridGeometryGenerator::computeArrays()
if ( isCellFaceVisible( i, j, k, StructGridInterface::POS_K ) )
visibleFaces.push_back( cvf::StructGridInterface::POS_K );
if ( visibleFaces.size() > 0 )
if ( !visibleFaces.empty() )
{
cvf::Vec3d cornerVerts[8];
m_grid->cellCornerVertices( cellIndex, cornerVerts );