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

This commit is contained in:
Kristian Bendiksen
2023-09-27 08:07:49 +02:00
parent 98796b0dd9
commit 959c9d48fa
220 changed files with 432 additions and 431 deletions

View File

@@ -503,7 +503,7 @@ void RimEnsembleCurveSet::deleteEnsembleCurves()
curvesIndexesToDelete.push_back( c );
}
while ( curvesIndexesToDelete.size() > 0 )
while ( !curvesIndexesToDelete.empty() )
{
size_t currIndex = curvesIndexesToDelete.back();
delete m_curves[currIndex];
@@ -525,7 +525,7 @@ void RimEnsembleCurveSet::deleteStatisticsCurves()
curvesIndexesToDelete.push_back( c );
}
while ( curvesIndexesToDelete.size() > 0 )
while ( !curvesIndexesToDelete.empty() )
{
size_t currIndex = curvesIndexesToDelete.back();
delete m_curves[currIndex];
@@ -808,7 +808,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
if ( m_colorMode() == ColorMode::BY_OBJECTIVE_FUNCTION || m_colorMode == ColorMode::BY_CUSTOM_OBJECTIVE_FUNCTION )
{
if ( m_objectiveValuesSummaryAddresses.size() == 0 )
if ( m_objectiveValuesSummaryAddresses.empty() )
{
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
summaryAddress->setAddress( m_yValuesSummaryAddress->address() );