mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10649 ApplicationLibCode: Use collection.empty() instead of comparing with size
This commit is contained in:
@@ -53,7 +53,7 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled() const
|
||||
std::vector<caf::PdmPointer<RimEclipseResultCase>> typedObjects;
|
||||
objectGroup.objectsByType( &typedObjects );
|
||||
|
||||
if ( typedObjects.size() == 0 )
|
||||
if ( typedObjects.empty() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ void RicPasteEclipseCasesFeature::onActionTriggered( bool isChecked )
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
|
||||
|
||||
if ( objectGroup.objects.size() == 0 ) return;
|
||||
if ( objectGroup.objects.empty() ) return;
|
||||
|
||||
addCasesToGridCaseGroup( objectGroup, gridCaseGroup );
|
||||
|
||||
@@ -115,7 +115,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup( caf::PdmObjectGroup&
|
||||
}
|
||||
}
|
||||
|
||||
if ( resultCases.size() == 0 )
|
||||
if ( resultCases.empty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled() const
|
||||
std::vector<caf::PdmPointer<RimGeoMechView>> typedObjects;
|
||||
objectGroup.objectsByType( &typedObjects );
|
||||
|
||||
if ( typedObjects.size() == 0 )
|
||||
if ( typedObjects.empty() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void RicPasteGeoMechViewsFeature::onActionTriggered( bool isChecked )
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
|
||||
|
||||
if ( objectGroup.objects.size() == 0 ) return;
|
||||
if ( objectGroup.objects.empty() ) return;
|
||||
|
||||
std::vector<caf::PdmPointer<RimGeoMechView>> geomViews;
|
||||
objectGroup.objectsByType( &geomViews );
|
||||
|
||||
@@ -71,7 +71,7 @@ void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
|
||||
|
||||
if ( objectGroup.objects.size() == 0 ) return;
|
||||
if ( objectGroup.objects.empty() ) return;
|
||||
|
||||
std::vector<caf::PdmPointer<RimExtrudedCurveIntersection>> intersectionObjects;
|
||||
objectGroup.objectsByType( &intersectionObjects );
|
||||
|
||||
Reference in New Issue
Block a user