#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

@@ -208,7 +208,7 @@ void RimSimWellFracture::updateFracturePositionFromLocation()
{
computeSimWellBranchesIfRequired();
if ( m_branchCenterLines.size() > 0 )
if ( !m_branchCenterLines.empty() )
{
cvf::Vec3d interpolated = m_branchCenterLines[m_branchIndex()].interpolatedPointAlongWellPath( m_location() );
@@ -266,7 +266,7 @@ void RimSimWellFracture::defineEditorAttribute( const caf::PdmFieldHandle* field
{
computeSimWellBranchesIfRequired();
if ( m_branchCenterLines.size() > 0 )
if ( !m_branchCenterLines.empty() )
{
const RigSimulationWellCoordsAndMD& pointAndMd = m_branchCenterLines[m_branchIndex];
@@ -287,12 +287,12 @@ QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions( const c
if ( fieldNeedingOptions == &m_branchIndex )
{
if ( m_branchCenterLines.size() == 0 )
if ( m_branchCenterLines.empty() )
{
computeSimWellBranchesIfRequired();
}
if ( m_branchCenterLines.size() > 0 )
if ( !m_branchCenterLines.empty() )
{
size_t branchCount = m_branchCenterLines.size();
@@ -324,7 +324,7 @@ RigMainGrid* RimSimWellFracture::ownerCaseMainGrid() const
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::computeSimWellBranchesIfRequired()
{
if ( m_branchCenterLines.size() == 0 )
if ( m_branchCenterLines.empty() )
{
computeSimWellBranchCenterLines();
}