From d2431a40a9f047a77729694a8f984049a76c5462 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 21 Dec 2018 12:17:07 +0100 Subject: [PATCH] CppCheck : Remove unused variable, use range based for --- .../Commands/CompletionExportCommands/RicMswSegment.h | 1 - .../Commands/ExportCommands/RicExportLgrFeature.h | 1 - ApplicationCode/Commands/RicImportGeoMechCaseFeature.cpp | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicMswSegment.h b/ApplicationCode/Commands/CompletionExportCommands/RicMswSegment.h index a647b827fd..280b978cd8 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicMswSegment.h +++ b/ApplicationCode/Commands/CompletionExportCommands/RicMswSegment.h @@ -79,7 +79,6 @@ private: double m_endTVD; double m_effectiveDiameter; double m_holeDiameter; - double m_linerDiameter; double m_openHoleRoughnessFactor; double m_skinFactor; diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h index 436db3034f..c657c36856 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h @@ -97,7 +97,6 @@ public: CompletionInfo(RigCompletionData::CompletionType type, const QString& name) : type(type) , name(name) - , wellPathName(wellPathName) { } RigCompletionData::CompletionType type; diff --git a/ApplicationCode/Commands/RicImportGeoMechCaseFeature.cpp b/ApplicationCode/Commands/RicImportGeoMechCaseFeature.cpp index 11ac6cd35a..ce218c094e 100644 --- a/ApplicationCode/Commands/RicImportGeoMechCaseFeature.cpp +++ b/ApplicationCode/Commands/RicImportGeoMechCaseFeature.cpp @@ -45,11 +45,9 @@ void RicImportGeoMechCaseFeature::onActionTriggered(bool isChecked) if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath(); app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir); - for (int i = 0; i < fileNames.size(); i++) + for (const auto& fileName : fileNames) { - QString fileName = fileNames[i]; - - if (!fileNames.isEmpty()) + if (!fileName.isEmpty()) { if (app->openOdbCaseFromFile(fileName)) {