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

@@ -445,7 +445,7 @@ void RimWellLogCurveCommonDataSource::analyseCurvesAndTracks( const std::vector<
}
if ( m_uniqueBranchDetection.size() == 1u )
{
setBranchDetectionToApply( *m_uniqueBranchDetection.begin() == true ? caf::Tristate::State::True : caf::Tristate::State::False );
setBranchDetectionToApply( *m_uniqueBranchDetection.begin() ? caf::Tristate::State::True : caf::Tristate::State::False );
}
if ( m_uniqueWellNames.size() == 1u )
{
@@ -460,7 +460,7 @@ void RimWellLogCurveCommonDataSource::analyseCurvesAndTracks( const std::vector<
if ( m_uniqueWbsSmoothing.size() == 1u )
{
setWbsSmoothingToApply( *m_uniqueWbsSmoothing.begin() == true ? caf::Tristate::State::True : caf::Tristate::State::False );
setWbsSmoothingToApply( *m_uniqueWbsSmoothing.begin() ? caf::Tristate::State::True : caf::Tristate::State::False );
}
if ( m_uniqueWbsSmoothingThreshold.size() == 1u )

View File

@@ -1337,12 +1337,7 @@ bool RimWellLogExtractionCurve::branchDetection() const
bool RimWellLogExtractionCurve::isEclipseCurve() const
{
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case.value() );
if ( eclipseCase )
{
return true;
}
return false;
return eclipseCase != nullptr;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -2878,9 +2878,9 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
{
if ( m_formationWellPathForSourceWellPath == nullptr ) return;
if ( !( plot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ||
plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ||
plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
if ( plot->depthType() != RiaDefines::DepthTypeEnum::MEASURED_DEPTH &&
plot->depthType() != RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH &&
plot->depthType() != RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
return;
}