Add readability-simplify-boolean-expr

* Add readability-simplify-boolean-expr
* Fixes based on review
This commit is contained in:
Magne Sjaastad
2023-06-26 13:12:41 +02:00
committed by GitHub
parent 34d83efaed
commit 59ca0b943c
116 changed files with 179 additions and 635 deletions

View File

@@ -1137,14 +1137,7 @@ bool RimEclipseResultDefinition::hasStaticResult() const
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
RigEclipseResultAddress gridScalarResultIndex = this->eclipseResultAddress();
if ( hasResult() && gridCellResults->timeStepCount( gridScalarResultIndex ) == 1 )
{
return true;
}
else
{
return false;
}
return hasResult() && gridCellResults->timeStepCount( gridScalarResultIndex ) == 1;
}
//--------------------------------------------------------------------------------------------------
@@ -1465,13 +1458,8 @@ bool RimEclipseResultDefinition::hasCategoryResult() const
//--------------------------------------------------------------------------------------------------
bool RimEclipseResultDefinition::isFlowDiagOrInjectionFlooding() const
{
if ( this->m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ||
this->m_resultType() == RiaDefines::ResultCatType::INJECTION_FLOODING )
{
return true;
}
return false;
return this->m_resultType() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS ||
this->m_resultType() == RiaDefines::ResultCatType::INJECTION_FLOODING;
}
//--------------------------------------------------------------------------------------------------
@@ -1903,10 +1891,5 @@ bool RimEclipseResultDefinition::addPerCellFaceOptionsForVariableUiField() const
RimEclipsePropertyFilter* propFilter = firstAncestorOrThisOfType<RimEclipsePropertyFilter>();
RimCellEdgeColors* cellEdge = firstAncestorOrThisOfType<RimCellEdgeColors>();
if ( propFilter || curve || cellEdge )
{
return false;
}
return true;
return !( propFilter || curve || cellEdge );
}