mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add readability-simplify-boolean-expr
* Add readability-simplify-boolean-expr * Fixes based on review
This commit is contained in:
@@ -651,8 +651,8 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault )
|
||||
if ( RiaCurveDataTools::isValidValue( eParam.minValue, false ) ) m_lowerLimit = eParam.minValue;
|
||||
if ( RiaCurveDataTools::isValidValue( eParam.maxValue, false ) ) m_upperLimit = eParam.maxValue;
|
||||
|
||||
if ( forceDefault || !( m_minValue >= m_lowerLimit && m_minValue <= m_upperLimit ) ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || !( m_maxValue >= m_lowerLimit && m_maxValue <= m_upperLimit ) ) m_maxValue = m_upperLimit;
|
||||
if ( forceDefault || m_minValue < m_lowerLimit || m_minValue > m_upperLimit ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || m_maxValue < m_lowerLimit || m_maxValue > m_upperLimit ) m_maxValue = m_upperLimit;
|
||||
|
||||
m_minValue.uiCapability()->setUiName( QString( "Min (%1)" ).arg( m_lowerLimit ) );
|
||||
m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) );
|
||||
@@ -675,8 +675,8 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault )
|
||||
m_lowerLimit = minObjValue;
|
||||
m_upperLimit = maxObjValue;
|
||||
|
||||
if ( forceDefault || !( m_minValue >= m_lowerLimit && m_minValue <= m_upperLimit ) ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || !( m_maxValue >= m_lowerLimit && m_maxValue <= m_upperLimit ) ) m_maxValue = m_upperLimit;
|
||||
if ( forceDefault || m_minValue < m_lowerLimit || m_minValue > m_upperLimit ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || m_maxValue < m_lowerLimit || m_maxValue > m_upperLimit ) m_maxValue = m_upperLimit;
|
||||
|
||||
m_minValue.uiCapability()->setUiName( QString( "Min (%1)" ).arg( m_lowerLimit ) );
|
||||
m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) );
|
||||
@@ -691,8 +691,8 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault )
|
||||
m_lowerLimit = minMaxValues.first;
|
||||
m_upperLimit = minMaxValues.second;
|
||||
|
||||
if ( forceDefault || !( m_minValue >= m_lowerLimit && m_minValue <= m_upperLimit ) ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || !( m_maxValue >= m_lowerLimit && m_maxValue <= m_upperLimit ) ) m_maxValue = m_upperLimit;
|
||||
if ( forceDefault || m_minValue < m_lowerLimit || m_minValue > m_upperLimit ) m_minValue = m_lowerLimit;
|
||||
if ( forceDefault || m_maxValue < m_lowerLimit || m_maxValue > m_upperLimit ) m_maxValue = m_upperLimit;
|
||||
|
||||
m_minValue.uiCapability()->setUiName( QString( "Min (%1)" ).arg( m_lowerLimit ) );
|
||||
m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) );
|
||||
|
||||
@@ -57,9 +57,7 @@ bool RimMultiSummaryPlotNameHelper::isPlotDisplayingSingleVectorName() const
|
||||
if ( nameHelper->isPlotDisplayingSingleVectorName() ) plotCountWithSingleQuantity++;
|
||||
}
|
||||
|
||||
if ( plotCountWithSingleQuantity == 1 ) return true;
|
||||
|
||||
return false;
|
||||
return plotCountWithSingleQuantity == 1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -423,13 +423,8 @@ bool RimSummaryAddressCollection::isEnsemble() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryAddressCollection::isFolder() const
|
||||
{
|
||||
if ( contentType() == CollectionContentType::WELL_FOLDER || contentType() == CollectionContentType::GROUP_FOLDER ||
|
||||
contentType() == CollectionContentType::REGION_FOLDER )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return contentType() == CollectionContentType::WELL_FOLDER || contentType() == CollectionContentType::GROUP_FOLDER ||
|
||||
contentType() == CollectionContentType::REGION_FOLDER;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -56,12 +56,7 @@ void caf::AppEnum<RimSummaryCurveAppearanceCalculator::CurveAppearanceType>::set
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool isExcplicitHandled( char secondChar )
|
||||
{
|
||||
if ( secondChar == 'W' || secondChar == 'O' || secondChar == 'G' || secondChar == 'V' )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return secondChar == 'W' || secondChar == 'O' || secondChar == 'G' || secondChar == 'V';
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user