From 724d9a1864d3440796438d4325b02d7566c87b7e Mon Sep 17 00:00:00 2001 From: Magne Date: Fri, 9 May 2025 13:59:39 +0200 Subject: [PATCH] Janitor fixes detected by clang-19 --- .../Commands/3dView/RicApplyUserDefinedCameraFeature.cpp | 2 +- .../WellPathCommands/RicCreateMultipleWellPathLaterals.cpp | 7 +++---- .../Summary/RimSummaryCaseMainCollection.cpp | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp index 6e30194eaf..95e5c4fc50 100644 --- a/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp +++ b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp @@ -52,7 +52,7 @@ bool RicApplyUserDefinedCameraFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicApplyUserDefinedCameraFeature::onActionTriggered( bool isChecked ) { - if ( auto camera = RicStoreUserDefinedCameraFeature::activeCamera() ) + if ( RicStoreUserDefinedCameraFeature::activeCamera() ) { cvf::Vec3d eye = cvf::Vec3d::UNDEFINED; cvf::Vec3d vrp = cvf::Vec3d::UNDEFINED; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp index d899b58c94..535ed2ad7c 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp @@ -63,15 +63,14 @@ void RicCreateMultipleWellPathLaterals::onActionTriggered( bool isChecked ) double startMD = 0.0; double endMD = 0.0; - auto sourceLateral = m_ui->sourceLateral(); - if ( sourceLateral ) + if ( auto sourceLateral = m_ui->sourceLateral() ) { if ( auto tieIn = sourceLateral->wellPathTieIn() ) { - startMD = sourceLateral->wellPathTieIn()->tieInMeasuredDepth() + 50.0; + startMD = tieIn->tieInMeasuredDepth() + 50.0; endMD = startMD + 50.0; - if ( auto parentWell = sourceLateral->wellPathTieIn()->parentWell() ) + if ( auto parentWell = tieIn->parentWell() ) { if ( !parentWell->wellPathGeometry()->measuredDepths().empty() ) { diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp index 21d544dd4c..306aa94e75 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp @@ -496,7 +496,8 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( std::vectorsummaryDataReader() != RiaPreferencesSummary::SummaryReaderMode::HDF5_OPM_COMMON ); + [[maybe_unused]] bool canUseMultipleTreads = + ( prefs->summaryDataReader() != RiaPreferencesSummary::SummaryReaderMode::HDF5_OPM_COMMON ); #pragma omp parallel for schedule( dynamic ) if ( canUseMultipleTreads ) for ( int cIdx = 0; cIdx < static_cast( fileSummaryCases.size() ); ++cIdx )