From e4672aefa99592e68858be536ff92a006aba4d7f Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 13:46:12 +0200 Subject: [PATCH 01/14] #4348 System , cppcheck : Remove duplicate test --- ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp index 20f2df7036..ad45826220 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp @@ -287,7 +287,6 @@ void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* chan this->loadDataAndUpdate(true); } else if (changedField == &m_branchDetection || - changedField == &m_branchIndex || changedField == &m_branchIndex) { clearGeneratedSimWellPaths(); @@ -979,4 +978,4 @@ void RimWellLogExtractionCurve::setBranchDetection(bool branchDetection) void RimWellLogExtractionCurve::setBranchIndex(int index) { m_branchIndex = index; -} \ No newline at end of file +} From 64fc5d71ef5d8ad0590d5a0cc876e6449bf5ead9 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 13:53:51 +0200 Subject: [PATCH 02/14] #4348 System , cppcheck : Use size_t when counting parameter instances --- .../ProjectDataModel/Summary/RimSummaryCaseCollection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp index 4d648adb62..10a6d23a92 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp @@ -294,8 +294,8 @@ EnsembleParameter RimSummaryCaseCollection::ensembleParameter(const QString& par EnsembleParameter eParam; eParam.name = paramName; - bool numericValuesCount = 0; - bool textValuesCount = 0; + size_t numericValuesCount = 0; + size_t textValuesCount = 0; // Prepare case realization params, and check types for (const auto& rimCase : allSummaryCases()) From 4ec289a7fac6ae68aa8378839330cab572e0e177 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 14:01:47 +0200 Subject: [PATCH 03/14] #4348 System , cppcheck : Remove unused variables --- .../Tools/WellPathTools/RiaSCurveCalculator.cpp | 1 - ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp | 7 ------- 2 files changed, 8 deletions(-) diff --git a/ApplicationCode/Application/Tools/WellPathTools/RiaSCurveCalculator.cpp b/ApplicationCode/Application/Tools/WellPathTools/RiaSCurveCalculator.cpp index d627df3523..83281577ec 100644 --- a/ApplicationCode/Application/Tools/WellPathTools/RiaSCurveCalculator.cpp +++ b/ApplicationCode/Application/Tools/WellPathTools/RiaSCurveCalculator.cpp @@ -211,7 +211,6 @@ void RiaSCurveCalculator::initializeByFinding_q1q2(cvf::Vec3d p1, double azi1, d const int maxIterations = 40; const double maxError = 0.01; - const double closeError = 40*maxError; const double maxStepSize = 1.0e9; const double maxLengthToQ = 1.0e10; bool enableBackstepping = false; diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp index 59e1b9a1cc..d829d64948 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp @@ -81,8 +81,6 @@ void RifEclipseSummaryTools::findSummaryFiles(const QString& inputFile, } } stringlist_free(summary_file_list); - - return; } //-------------------------------------------------------------------------------------------------- @@ -92,7 +90,6 @@ QString RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile(const QStr { char* myPath = nullptr; char* myBase = nullptr; - bool formattedFile = true; util_alloc_file_components(RiaStringEncodingTools::toNativeEncoded(QDir::toNativeSeparators(summaryHeaderFile)).data(), &myPath, &myBase, nullptr); @@ -100,10 +97,6 @@ QString RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile(const QStr if (!caseFile) { caseFile= ecl_util_alloc_exfilename(myPath, myBase, ECL_EGRID_FILE, false, -1); - if (caseFile) - { - formattedFile = false; - } } QString gridCaseFile; From 3c2f4eb692176cb6f7b381c49f7e37b499a3c350 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 14:10:46 +0200 Subject: [PATCH 04/14] #4348 System , cppcheck : Remove unused variables --- .../FileInterface/RifEclipseUserDataParserTools.cpp | 3 +-- .../GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp | 1 - .../ModelVisualization/RivPipeGeometryGenerator.cpp | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ApplicationCode/FileInterface/RifEclipseUserDataParserTools.cpp b/ApplicationCode/FileInterface/RifEclipseUserDataParserTools.cpp index 6c61050100..b161667960 100644 --- a/ApplicationCode/FileInterface/RifEclipseUserDataParserTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseUserDataParserTools.cpp @@ -668,7 +668,6 @@ std::vector RifEclipseUserDataParserTools::columnInfoFromColumnHeaders(c std::string quantity = columnLines[0]; std::string unit; - std::string scaling; size_t startIndex = 1; @@ -681,7 +680,7 @@ std::vector RifEclipseUserDataParserTools::columnInfoFromColumnHeaders(c if (isScalingDetected) { - scaling = columnLines[2]; + //std::string scaling = columnLines[2]; startIndex = 3; } diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index 004443b92f..f5a1d3f50c 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -2790,7 +2790,6 @@ void findReferenceElementForNode(const RigFemPart& part, size_t nodeIdx, size_t part.findIntersectingCells(bb, &refElementCandidates); const RigFemPartGrid* grid = part.getOrCreateStructGrid(); - const std::vector& nodeCoords = part.nodes().coordinates; refElement->elementIdx = cvf::UNDEFINED_SIZE_T; refElement->intersectionPointToCurrentNodeDistance = std::numeric_limits::infinity(); diff --git a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp index 17e937a895..824e0004f9 100644 --- a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp @@ -384,8 +384,6 @@ cvf::ref RivPipeGeometryGenerator::generateVariableRadiusTube( const cvf::Vec3dArray* cylinderCenterCoords, const std::vector& radii) { - const double epsilon = 1.0e-8; - CVF_ASSERT(cylinderCenterCoords != nullptr); // Calculate first valid pipe direction, to be able to handle centerNodes in the same place From e2d21bb4f94a5f6ddaa8374c4f4ec5c4e90755a3 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 14:24:17 +0200 Subject: [PATCH 05/14] #4348 System , cppcheck : Remove unused local variables --- .../RivTensorResultPartMgr.cpp | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp b/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp index 3e4f0d4b28..0807084778 100644 --- a/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp @@ -219,29 +219,6 @@ void RivTensorResultPartMgr::calculateElementTensors(const RigFemPart& (*elmTensors)[elmIdx] = tensorSumOfElmNodes * (1.0 / 8.0); } } - - std::array, 3> elmPrincipals; - std::vector> elmPrincipalDirections; - - elmPrincipals[0].resize(elmCount); - elmPrincipals[1].resize(elmCount); - elmPrincipals[2].resize(elmCount); - - elmPrincipalDirections.resize(elmCount); - - for (size_t nIdx = 0; nIdx < elmCount; ++nIdx) - { - cvf::Vec3f principalDirs[3]; - cvf::Vec3f principalValues = (*elmTensors)[nIdx].calculatePrincipals(principalDirs); - - elmPrincipals[0][nIdx] = principalValues[0]; - elmPrincipals[1][nIdx] = principalValues[1]; - elmPrincipals[2][nIdx] = principalValues[2]; - - elmPrincipalDirections[nIdx][0] = principalDirs[0]; - elmPrincipalDirections[nIdx][1] = principalDirs[1]; - elmPrincipalDirections[nIdx][2] = principalDirs[2]; - } } //-------------------------------------------------------------------------------------------------- From ca72e6ab89316bfa01d873feb5a78e794ca5202d Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 14:34:23 +0200 Subject: [PATCH 06/14] #4348 System , cppcheck : Remove unused variables --- .../ProjectDataModel/Rim2dIntersectionViewCollection.cpp | 1 - .../ProjectDataModel/Summary/RimObservedDataCollection.cpp | 2 -- ApplicationCode/ReservoirDataModel/RigFishbonesGeometry.cpp | 1 - ApplicationCode/ReservoirDataModel/RigNNCData.cpp | 2 -- 4 files changed, 6 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Rim2dIntersectionViewCollection.cpp b/ApplicationCode/ProjectDataModel/Rim2dIntersectionViewCollection.cpp index 6e3382cb8d..f8c7360e2c 100644 --- a/ApplicationCode/ProjectDataModel/Rim2dIntersectionViewCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Rim2dIntersectionViewCollection.cpp @@ -63,7 +63,6 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda parentCase->descendantsIncludingThisOfType(allOrderedIntersectionsInCase); std::set currentIntersections(allOrderedIntersectionsInCase.begin(), allOrderedIntersectionsInCase.end()); - std::set intersectionsNeedingViews = currentIntersections; // Delete views without a valid intersection diff --git a/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp index fea5bcd6ef..7e09a7401e 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp @@ -149,7 +149,6 @@ RimObservedData* RimObservedDataCollection::createAndAddCvsObservedDataFromFile( if (!fileExists(fileName, errorText)) return nullptr; RimObservedData* observedData = nullptr; - bool parseOk = false; RimCsvUserData* userData = new RimCsvUserData(); RicPasteAsciiDataToSummaryPlotFeatureUi* parseOptions = userData->parseOptions(); @@ -186,7 +185,6 @@ RimObservedData* RimObservedDataCollection::createAndAddCvsObservedDataFromFile( { this->m_observedDataArray.push_back(userData); observedData = userData; - parseOk = true; } else { diff --git a/ApplicationCode/ReservoirDataModel/RigFishbonesGeometry.cpp b/ApplicationCode/ReservoirDataModel/RigFishbonesGeometry.cpp index cc87ac523f..4976a560c7 100644 --- a/ApplicationCode/ReservoirDataModel/RigFishbonesGeometry.cpp +++ b/ApplicationCode/ReservoirDataModel/RigFishbonesGeometry.cpp @@ -183,7 +183,6 @@ cvf::Vec3d RigFisbonesGeometry::closestMainAxis(const cvf::Vec3d& vec) if (cvf::Math::abs(vec.z()) > maxValue) { maxComponent = 2; - maxValue = cvf::Math::abs(vec.z()); } if (maxComponent == 0) diff --git a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp index c1c3bd7221..2947d98038 100644 --- a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp @@ -44,7 +44,6 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid) const RigCell& c1 = mainGrid.globalCellArray()[m_connections[cnIdx].m_c1GlobIdx]; const RigCell& c2 = mainGrid.globalCellArray()[m_connections[cnIdx].m_c2GlobIdx]; - bool foundAnyOverlap = false; std::vector connectionPolygon; std::vector connectionIntersections; cvf::StructGridInterface::FaceType connectionFace = cvf::StructGridInterface::NO_FACE; @@ -53,7 +52,6 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid) if (connectionFace != cvf::StructGridInterface::NO_FACE) { - foundAnyOverlap = true; // Found an overlap polygon. Store data about connection m_connections[cnIdx].m_c1Face = connectionFace; From 8cefcbb56269b65a286a916731eae35c2281ec0e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 15:11:21 +0200 Subject: [PATCH 07/14] #4348 System , cppcheck : Remove unused variables --- .../Commands/ExportCommands/RicExportLgrFeature.cpp | 1 - .../FileInterface/RifSummaryCaseRestartSelector.cpp | 1 - .../GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp | 1 - .../Annotations/RimUserDefinedPolylinesAnnotation.cpp | 1 - ApplicationCode/ProjectDataModel/RimProject.cpp | 1 - .../Completions/RigEclipseToStimPlanCalculator.cpp | 2 -- ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp | 1 - ApplicationCode/UserInterface/RiuMainWindow.cpp | 1 - ApplicationCode/UserInterface/RiuPlotMainWindow.cpp | 1 - ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp | 3 --- 10 files changed, 13 deletions(-) diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp index 0caaace5f7..36ed5c5995 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp @@ -731,7 +731,6 @@ std::vector> } } - std::set cellsTaken; std::vector>> result; // Walk along well path diff --git a/ApplicationCode/FileInterface/RifSummaryCaseRestartSelector.cpp b/ApplicationCode/FileInterface/RifSummaryCaseRestartSelector.cpp index 0864987b40..42beb40b76 100644 --- a/ApplicationCode/FileInterface/RifSummaryCaseRestartSelector.cpp +++ b/ApplicationCode/FileInterface/RifSummaryCaseRestartSelector.cpp @@ -154,7 +154,6 @@ QStringList RifSummaryCaseRestartSelector::gridCaseFiles() const //-------------------------------------------------------------------------------------------------- void RifSummaryCaseRestartSelector::determineFilesToImport(const std::vector& initialFiles) { - std::vector fileInfos; if (m_showDialog) { bool enableApplyToAllField = initialFiles.size() > 1; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index f5a1d3f50c..23f5312c55 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -224,7 +224,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in { std::map> elementProperties = m_elementPropertyReader->readAllElementPropertiesInFileContainingField(resVarAddr.fieldName); - std::vector resultsForEachComponent; for (std::pair< std::string, std::vector> elem : elementProperties) { RigFemResultAddress addressForElement(RIG_ELEMENT, elem.first, ""); diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp b/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp index 358cfd985b..8ffaacf46b 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp +++ b/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp @@ -94,7 +94,6 @@ cvf::ref RimUserDefinedPolylinesAnnotation::polyLinesData() { cvf::ref pld = new RigPolyLinesData; std::vector line; - std::vector > lines; for (const RimPolylineTarget* target : m_targets) { line.push_back(target->targetPointXYZ()); diff --git a/ApplicationCode/ProjectDataModel/RimProject.cpp b/ApplicationCode/ProjectDataModel/RimProject.cpp index 04a548adc2..7cf0922fd1 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationCode/ProjectDataModel/RimProject.cpp @@ -965,7 +965,6 @@ std::vector RimProject::simulationWellNames() const //-------------------------------------------------------------------------------------------------- RimWellPath* RimProject::wellPathFromSimWellName(const QString& simWellName, int branchIndex) { - std::vector paths; for (RimWellPath* const path : allWellPaths()) { if (QString::compare(path->associatedSimulationWellName(), simWellName) == 0 && diff --git a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCalculator.cpp b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCalculator.cpp index f2af97134e..05e423f314 100644 --- a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCalculator.cpp @@ -149,8 +149,6 @@ double RigEclipseToStimPlanCalculator::areaWeightedMatrixPermeability() const RiaWeightedMeanCalculator calc; { - std::map reservoirCellAndIntersectedArea; - for (const auto& singleCellCalc : m_singleFractureCellCalculators) { const RigEclipseToStimPlanCellTransmissibilityCalculator& calulator = singleCellCalc.second; diff --git a/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp b/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp index 347d17a2e1..9815582181 100644 --- a/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp @@ -686,7 +686,6 @@ std::vector RigCellGeometryTools::unionOfPolygons(const std::vector< std::vector unionPolygon; for (ClipperLib::Path pathInSol : solution) { - std::vector clippedPolygon; for (ClipperLib::IntPoint IntPosition : pathInSol) { unionPolygon.push_back(fromClipperPoint(IntPosition)); diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index 2a6e48dcf0..698388a8ee 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -2076,7 +2076,6 @@ void RiuMainWindow::clearWindowTiling() { QMdiArea::WindowOrder currentActivationOrder = m_mdiArea->activationOrder(); - std::list windowList; for (QMdiSubWindow* subWindow : m_mdiArea->subWindowList(currentActivationOrder)) { subWindow->hide(); diff --git a/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp b/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp index 800c434788..cc0fa9b57b 100644 --- a/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp @@ -886,7 +886,6 @@ void RiuPlotMainWindow::clearWindowTiling() { QMdiArea::WindowOrder currentActivationOrder = m_mdiArea->activationOrder(); - std::list windowList; for (QMdiSubWindow* subWindow : m_mdiArea->subWindowList(currentActivationOrder)) { subWindow->hide(); diff --git a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp index b59927788b..d41a0d46fa 100644 --- a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp @@ -264,7 +264,6 @@ std::vector RiuSummaryCurveDefSelection::allCurveDefi for (SummarySource* currSource : selectedSummarySources()) { - std::vector sourceSources; RimSummaryCaseCollection* ensemble = dynamic_cast(currSource); RimSummaryCase* sumCase = dynamic_cast(currSource); @@ -321,7 +320,6 @@ std::vector RiuSummaryCurveDefSelection::allCurveSetDefin RimSummaryCaseCollection* ensemble = dynamic_cast(currSource); if (!ensemble) continue; - std::vector sourceSources; std::set addressesFromSource; // Build case list @@ -580,7 +578,6 @@ QList RiuSummaryCurveDefSelection::calculateValueOptions if (fieldNeedingOptions == &m_selectedSources) { RimProject* proj = RiaApplication::instance()->project(); - std::vector topLevelCases; std::vector oilFields; proj->allOilFields(oilFields); From 159f3fa0fcc7f8cb63e5e341b7cfe855ea4f3709 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 19:46:49 +0200 Subject: [PATCH 08/14] clang : Identify gridfile correctly --- ApplicationCode/Application/RiaDefines.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationCode/Application/RiaDefines.cpp b/ApplicationCode/Application/RiaDefines.cpp index fc86f4ad31..0c6445ba69 100644 --- a/ApplicationCode/Application/RiaDefines.cpp +++ b/ApplicationCode/Application/RiaDefines.cpp @@ -540,7 +540,7 @@ QString RiaDefines::defaultDirectoryLabel(RiaDefines::ImportFileType fileType) { defaultDirLabel = "GENERAL_DATA"; } - else if (fileType & (ECLIPSE_GRID_FILE | fileType & ECLIPSE_EGRID_FILE)) + else if (fileType & ECLIPSE_RESULT_GRID) { defaultDirLabel = "BINARY_GRID"; } From 44d80672a024aca19b984c61ea6cafbf4e465544 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 20 Apr 2019 19:47:57 +0200 Subject: [PATCH 09/14] clang : Compare instead of invalid assignment --- .../FractureCommands/RicCreateMultipleFracturesOptionItemUi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationCode/Commands/FractureCommands/RicCreateMultipleFracturesOptionItemUi.cpp b/ApplicationCode/Commands/FractureCommands/RicCreateMultipleFracturesOptionItemUi.cpp index 25a90abcfa..166619f12c 100644 --- a/ApplicationCode/Commands/FractureCommands/RicCreateMultipleFracturesOptionItemUi.cpp +++ b/ApplicationCode/Commands/FractureCommands/RicCreateMultipleFracturesOptionItemUi.cpp @@ -109,7 +109,7 @@ void RicCreateMultipleFracturesOptionItemUi::fieldChangedByUi(const caf::PdmFiel { if (m_topKOneBased > m_baseKOneBased) m_baseKOneBased = m_topKOneBased; } - else if (changedField = &m_baseKOneBased) + else if (changedField == &m_baseKOneBased) { if (m_baseKOneBased < m_topKOneBased) m_topKOneBased = m_baseKOneBased; } From b786c2c5f3760ad7a2794256c41900e28e01e66f Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 21 Apr 2019 07:53:52 +0200 Subject: [PATCH 10/14] #4348 System , cppcheck : Remove unused functions --- .../201-04-21-delete-unused_functions.txt | 121 ++++++++++++++++++ .../Application/Tools/CMakeLists_files.cmake | 2 - .../Application/Tools/RiaQIconTools.cpp | 44 ------- .../Application/Tools/RiaQIconTools.h | 32 ----- .../ExportCommands/RicExportLgrFeature.cpp | 80 ------------ .../ExportCommands/RicExportLgrFeature.h | 6 - ...loLensAutoExportToSharingServerFeature.cpp | 1 - ...ensCreateDummyFileBackedSessionFeature.cpp | 2 - .../RicHoloLensCreateSessionFeature.cpp | 2 - ...icHoloLensExportToSharingServerFeature.cpp | 1 - .../RicHoloLensTerminateSessionFeature.cpp | 1 - .../RifEclipseDataTableFormatter.cpp | 23 ---- .../RifEclipseDataTableFormatter.h | 2 - .../RimAnnotationInViewCollection.cpp | 8 -- .../RimAnnotationInViewCollection.h | 1 - ...StimPlanCellTransmissibilityCalculator.cpp | 22 +--- ...ToStimPlanCellTransmissibilityCalculator.h | 1 - 17 files changed, 125 insertions(+), 224 deletions(-) create mode 100644 ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt delete mode 100644 ApplicationCode/Application/Tools/RiaQIconTools.cpp delete mode 100644 ApplicationCode/Application/Tools/RiaQIconTools.h diff --git a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt new file mode 100644 index 0000000000..1b2c58100d --- /dev/null +++ b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt @@ -0,0 +1,121 @@ + + +Nothing to do +------------- + +WIP +--- + + +Candidate for later use +----------------------- + +Issue on GitHub +---- + +Must be changed +---------------- + +Deleted +------- + +Backlog +------- +unchanged ApplicationCode\Commands\HoloLensCommands\farmhash\farmhash.cc 1948 style unusedFunction false The function 'Hash128WithSeed' is never used. +unchanged ApplicationCode\ReservoirDataModel\cvfGeometryTools.cpp 614 style unusedFunction false The function 'addMidEdgeNodes' is never used. +unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 278 style unusedFunction false The function 'addValueTable' is never used. +unchanged ApplicationCode\ReservoirDataModel\Completions\RigEclipseToStimPlanCellTransmissibilityCalculator.cpp 109 style unusedFunction false The function 'aggregatedMatrixTransmissibility' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationInViewCollection.cpp 231 style unusedFunction false The function 'annotationsCount' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 848 style unusedFunction false The function 'appendIntersectedCells' is never used. +unchanged ApplicationCode\Application\Tools\RiaQIconTools.cpp 26 style unusedFunction false The function 'appendPixmapUpperLeft' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigEclipseResultBinSorter.cpp 48 style unusedFunction false The function 'binRange' is never used. +unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 147 style unusedFunction false The function 'cancelDownload' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 453 style unusedFunction false The function 'cellIJKFromCoordinate' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 486 style unusedFunction false The function 'cellMinMaxCordinates' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 684 style unusedFunction false The function 'cellsIntersectingCompletion' is never used. +unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 527 style unusedFunction false The function 'changeEvent' is never used. +unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 133 style unusedFunction false The function 'cleanupBeforeSettingPdmObject' is never used. +unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 73 style unusedFunction false The function 'configureAndUpdateUi' is never used. +unchanged ApplicationCode\Commands\RicCreateTemporaryLgrFeature.cpp 350 style unusedFunction false The function 'containsAnyNonMainGridCells' is never used. +unchanged ApplicationCode\UserInterface\RiuGridCrossQwtPlot.cpp 359 style unusedFunction false The function 'contextMenuEvent' is never used. +unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\VdeCachingHashedIdFactory.cpp 233 style unusedFunction false The function 'crc' is never used. +unchanged ApplicationCode\Application\Tools\RiaColorTables.cpp 580 style unusedFunction false The function 'createBrightnessBasedColorTable' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. +unchanged ApplicationCode\GeoMech\GeoMechVisualization\RivFemPartGeometryGenerator.cpp 106 style unusedFunction false The function 'createOutlineMeshDrawable' is never used. +unchanged ApplicationCode\ModelVisualization\RivWellConnectionFactorGeometryGenerator.cpp 202 style unusedFunction false The function 'createStarGeometry' is never used. +unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 119 style unusedFunction false The function 'createWidget' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\VdeVizDataExtractor.cpp 397 style unusedFunction false The function 'debugComparePackets' is never used. +unchanged ApplicationCode\Application\RiaApplication.cpp 2355 style unusedFunction false The function 'defaultAnnotationFont' is never used. +unchanged ApplicationCode\Commands\FractureCommands\RicCreateMultipleFracturesUi.cpp 201 style unusedFunction false The function 'defineCustomContextMenu' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 271 style unusedFunction false The function 'defineObjectEditorAttribute' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartResultsCollection.cpp 2267 style unusedFunction false The function 'deleteResultFrame' is never used. +unchanged ApplicationCode\ProjectDataModel\RimEclipseResultDefinition.cpp 944 style unusedFunction false The function 'diffResultUiShortNameHTML' is never used. +unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 254 style unusedFunction false The function 'dropMimeData' is never used. +unchanged ApplicationCode\FileInterface\RifEclipseSummaryTools.cpp 123 style unusedFunction false The function 'dumpMetaData' is never used. +unchanged ApplicationCode\FileInterface\RifJsonEncodeDecode.cpp 45 style unusedFunction false The function 'dumpToFile' is never used. +unchanged ApplicationCode\GeoMech\OdbReader\RifOdbReader.cpp 551 style unusedFunction false The function 'elementSet' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. +unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. +unchanged ApplicationCode\Application\RiaEclipseFileNameTools.cpp 73 style unusedFunction false The function 'findRelatedDataFile' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\VdeArrayDataPacket.cpp 221 style unusedFunction false The function 'fromRawPacketBuffer' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 503 style unusedFunction false The function 'gridPointCoordinate' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 362 style unusedFunction false The function 'gridPointCountI' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 371 style unusedFunction false The function 'gridPointCountJ' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 494 style unusedFunction false The function 'gridPointIndexFromIJK' is never used. +unchanged ApplicationCode\ProjectDataModel\GridCrossPlots\RimGridCrossPlotDataSet.cpp 400 style unusedFunction false The function 'groupStrings' is never used. +unchanged ApplicationCode\UserInterface\RiuCadNavigation.cpp 49 style unusedFunction false The function 'handleInputEvent' is never used. +unchanged ApplicationCode\Commands\Ric3dViewPickEventHandler.cpp 42 style unusedFunction false The function 'handlePickEvent' is never used. +unchanged ApplicationCode\ProjectDataModel\RimMimeData.cpp 56 style unusedFunction false The function 'hasFormat' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 354 style unusedFunction false The function 'hasResultAtVertex' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\VdeArrayDataPacket.cpp 173 style unusedFunction false The function 'imageComponentCount' is never used. +unchanged ApplicationCode\Application\Tools\RiaImageFileCompare.cpp 126 style unusedFunction false The function 'imagesEqual' is never used. +unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 760 style unusedFunction false The function 'initializePage' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 1417 style unusedFunction false The function 'isSummationResult' is never used. +unchanged ApplicationCode\UserInterface\RiuViewer.cpp 860 style unusedFunction false The function 'leaveEvent' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 405 style unusedFunction false The function 'maxCoordinate' is never used. +unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 332 style unusedFunction false The function 'mimeTypes' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 396 style unusedFunction false The function 'minCoordinate' is never used. +unchanged ApplicationCode\UserInterface\RiuFlowCharacteristicsPlot.cpp 271 style unusedFunction false The function 'minimumSizeHint' is never used. +unchanged ApplicationCode\UserInterface\RiuViewer.cpp 539 style unusedFunction false The function 'mousePressEvent' is never used. +unchanged ApplicationCode\UserInterface\RiuViewer.cpp 236 style unusedFunction false The function 'mouseReleaseEvent' is never used. +unchanged ApplicationCode\Commands\AnnotationCommands\RicCreateReachCircleAnnotationFeature.cpp 59 style unusedFunction false The function 'onActionTriggered' is never used. +unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 342 style unusedFunction false The function 'onDragCanceled' is never used. +unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculator.cpp 276 style unusedFunction false The function 'onEditorWidgetsCreated' is never used. +unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 565 style unusedFunction false The function 'onProposedDropActionUpdated' is never used. +unchanged ApplicationCode\UserInterface\RiuMultiCaseImportDialog.cpp 105 style unusedFunction false The function 'on_m_addSearchFolderButton_clicked' is never used. +unchanged ApplicationCode\UserInterface\RiuMultiCaseImportDialog.cpp 247 style unusedFunction false The function 'on_m_removeEclipseCaseButton_clicked' is never used. +unchanged ApplicationCode\UserInterface\RiuMultiCaseImportDialog.cpp 129 style unusedFunction false The function 'on_m_removeSearchFolderButton_clicked' is never used. +unchanged ApplicationCode\UserInterface\RiuViewer.cpp 345 style unusedFunction false The function 'paintOverlayItems' is never used. +unchanged ApplicationCode\ProjectDataModel\RimProject.cpp 1066 style unusedFunction false The function 'polylineAnnotations' is never used. +unchanged ApplicationCode\Application\RiaApplication.cpp 326 style unusedFunction false The function 'processNonGuiEvents' is never used. +unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 65 style unusedFunction false The function 'recursivelyConfigureAndUpdateTopLevelUiOrdering' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. +unchanged ApplicationCode\ProjectDataModel\RimScaleLegendConfig.cpp 447 style unusedFunction false The function 'setCurrentScale' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 59 style unusedFunction false The function 'setFontColor' is never used. +unchanged ApplicationCode\ProjectDataModel\RimEclipseResultDefinition.cpp 755 style unusedFunction false The function 'setFromEclipseResultAddress' is never used. +unchanged ApplicationCode\ProjectDataModel\Rim3dOverlayInfoConfig.cpp 278 style unusedFunction false The function 'setIsActive' is never used. +unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 137 style unusedFunction false The function 'setMaxDataRowWidth' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigLocalGrid.cpp 65 style unusedFunction false The function 'setPositionInParentGrid' is never used. +unchanged ApplicationCode\ProjectDataModel\RimRegularLegendConfig.cpp 737 style unusedFunction false The function 'setShowLegend' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimPolylinesAnnotationInView.cpp 66 style unusedFunction false The function 'setSourceAnnotation' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimWellPathAicdParameters.cpp 189 style unusedFunction false The function 'setUnitLabels' is never used. +unchanged ApplicationCode\ProjectDataModel\Flow\RimWellPltPlot.cpp 1067 style unusedFunction false The function 'setupBeforeSave' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 255 style unusedFunction false The function 'showContourLabels' is never used. +unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 519 style unusedFunction false The function 'showEvent' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigSimulationWellCenterLineCalculator.cpp 1064 style unusedFunction false The function 'splitIntoBranches' is never used. +unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 126 style unusedFunction false The function 'supportedDropActions' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigFlowDiagResultAddress.cpp 67 style unusedFunction false The function 'uiShortText' is never used. +unchanged ApplicationCode\Commands\CrossSectionCommands\RicAppendIntersectionFeature.cpp 121 style unusedFunction false The function 'undo' is never used. +unchanged ApplicationCode\ModelVisualization\RivCellEdgeEffectGenerator.cpp 281 style unusedFunction false The function 'updateForFixedFunctionRendering' is never used. +unchanged ApplicationCode\ModelVisualization\RivCellEdgeEffectGenerator.cpp 135 style unusedFunction false The function 'updateForShaderBasedRendering' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimSimWellFracture.cpp 117 style unusedFunction false The function 'wellDipAtFracturePosition' is never used. +unchanged ApplicationCode\UnitTests\ListKeywordsForObjectsAndFields-Test.cpp 16 style unusedFunction false The function 'writeTextToFile' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 42 style unusedFunction false The function 'xydToXyzVector' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\RicHoloLensSessionManager.h 47 style unusedPrivateFunction false Unused private function: 'RicHoloLensSessionManager::handleSessionNotification' +unchanged ApplicationCode\Commands\HoloLensCommands\VdeVizDataExtractor.h 106 style unusedPrivateFunction false Unused private function: 'VdeVizDataExtractor::debugComparePackets' +unchanged ApplicationCode\FileInterface\RifCaseRealizationParametersReader.h 101 style unusedPrivateFunction false Unused private function: 'RifCaseRealizationRunspecificationReader::closeDataStream' +unchanged ApplicationCode\ReservoirDataModel\RigSimulationWellCenterLineCalculator.h 52 style unusedPrivateFunction false Unused private function: 'RigSimulationWellCenterLineCalculator::splitIntoBranches' diff --git a/ApplicationCode/Application/Tools/CMakeLists_files.cmake b/ApplicationCode/Application/Tools/CMakeLists_files.cmake index 00518c70ac..a18cfd9c28 100644 --- a/ApplicationCode/Application/Tools/CMakeLists_files.cmake +++ b/ApplicationCode/Application/Tools/CMakeLists_files.cmake @@ -36,7 +36,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaWeightedGeometricMeanCalculator.h ${CMAKE_CURRENT_LIST_DIR}/RiaWeightedHarmonicMeanCalculator.h ${CMAKE_CURRENT_LIST_DIR}/RiaOptionItemFactory.h ${CMAKE_CURRENT_LIST_DIR}/RiaGitDiff.h -${CMAKE_CURRENT_LIST_DIR}/RiaQIconTools.h ${CMAKE_CURRENT_LIST_DIR}/RiaCellDividingTools.h ${CMAKE_CURRENT_LIST_DIR}/RiaFieldHandleTools.h ${CMAKE_CURRENT_LIST_DIR}/RiaBoundingBoxTools.h @@ -76,7 +75,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaWeightedGeometricMeanCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaWeightedHarmonicMeanCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaOptionItemFactory.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaGitDiff.cpp -${CMAKE_CURRENT_LIST_DIR}/RiaQIconTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaCellDividingTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaFieldHandleTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaBoundingBoxTools.cpp diff --git a/ApplicationCode/Application/Tools/RiaQIconTools.cpp b/ApplicationCode/Application/Tools/RiaQIconTools.cpp deleted file mode 100644 index 6ed68f4850..0000000000 --- a/ApplicationCode/Application/Tools/RiaQIconTools.cpp +++ /dev/null @@ -1,44 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2018 Equinor ASA -// -// ResInsight is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RiaQIconTools.h" - -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QPixmap RiaQIconTools::appendPixmapUpperLeft(const QPixmap& pixmap, const QPixmap& overlayPixmap) -{ - QPixmap scaledPixmap; - { - QSize size = pixmap.size() - pixmap.size() / 4; - - scaledPixmap = overlayPixmap.scaled(size); - } - - QPixmap combinedPixmap(pixmap); - QPainter painter(&combinedPixmap); - - int x = 0; - int y = -4; - - painter.drawPixmap(x, y, scaledPixmap); - - return combinedPixmap; -} diff --git a/ApplicationCode/Application/Tools/RiaQIconTools.h b/ApplicationCode/Application/Tools/RiaQIconTools.h deleted file mode 100644 index 370921b4da..0000000000 --- a/ApplicationCode/Application/Tools/RiaQIconTools.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2018 Equinor ASA -// -// ResInsight is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include - -//================================================================================================== -// -// -// -//================================================================================================== -class RiaQIconTools -{ -public: - static QPixmap appendPixmapUpperLeft(const QPixmap& pixmap, const QPixmap& overlayPixmap); -}; diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp index 36ed5c5995..20a4c48d48 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp @@ -780,86 +780,6 @@ std::vector> return result; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -//std::map> -// RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion_old(RimEclipseCase* eclipseCase, -// const RimWellPath* wellPath, -// size_t timeStep, -// const std::set& completionTypes, -// bool* isIntersectingOtherLgrs) -//{ -// std::map> completionToCells; -// -// *isIntersectingOtherLgrs = false; -// -// auto wellPathGeometry = wellPath->wellPathGeometry(); -// auto completions = eclipseCase->computeAndGetVirtualPerforationTransmissibilities(); -// if (wellPathGeometry && completions) -// { -// const auto& intCells = completions->multipleCompletionsPerEclipseCell(wellPath, timeStep); -// CompletionInfo lastCompletionInfo; -// -// auto wpIntCells = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(eclipseCase->eclipseCaseData(), -// wellPathGeometry->wellPathPoints(), -// wellPathGeometry->measureDepths()); -// -// auto wpComplCells = createOrderedIntersectionList(wpIntCells, intCells); -// -// // This loop assumes that cells are ordered downwards along well path -// for (auto intCell : wpComplCells) -// { -// if (!intCell.first.isMainGridCell()) -// { -// *isIntersectingOtherLgrs = true; -// continue; -// } -// -// auto filteredCompletions = filterCompletionsOnType(intCell.second, completionTypes); -// if (filteredCompletions.empty()) continue; -// -// auto completion = findCompletionByPriority(filteredCompletions); -// -// QString name = completionName(completion.sourcePdmObject()); -// CompletionInfo completionInfo(completion.completionType(), name, 0); -// -// if (!lastCompletionInfo.isValid()) lastCompletionInfo = completionInfo; -// -// if (completionInfo != lastCompletionInfo && completionToCells.count(completionInfo) > 0) -// { -// completionInfo.number++; -// } -// completionToCells[completionInfo].push_back(intCell.first); -// lastCompletionInfo = completionInfo; -// } -// } -// return completionToCells; -//} - - -template -void appendVector(std::vector& dest, const std::vector& append) -{ - dest.insert(dest.end(), append.begin(), append.end()); -} - -void appendIntersectedCells(std::map>& dest, - const std::map>& append) -{ - for (auto& intCell : append) - { - if (dest.count(intCell.first) == 0) - { - dest.insert(intCell); - } - else - { - appendVector(dest[intCell.first], intCell.second); - } - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h index c657c36856..20c304917f 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h @@ -213,12 +213,6 @@ private: size_t timeStep, const std::set& completionTypes, bool* isIntersectingOtherLgrs); - //static std::map> - // cellsIntersectingCompletions_PerCompletion_old(RimEclipseCase* eclipseCase, - // const RimWellPath* wellPath, - // size_t timeStep, - // const std::set& completionTypes, - // bool* isIntersectingOtherLgrs); static std::map> cellsIntersectingCompletions_PerCompletion(RimEclipseCase* eclipseCase, diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp index 3fe309df5c..cbeec74488 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp @@ -22,7 +22,6 @@ #include "RiaApplication.h" #include "RiaLogging.h" -#include "RiaQIconTools.h" #include "RimGridView.h" diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp index b93753aa31..45e0639bdd 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp @@ -20,8 +20,6 @@ #include "RicHoloLensSessionManager.h" -#include "RiaQIconTools.h" - #include CAF_CMD_SOURCE_INIT(RicHoloLensCreateDummyFiledBackedSessionFeature, "RicHoloLensCreateDummyFiledBackedSessionFeature"); diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp index 80e37393b2..dc44b358c1 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp @@ -18,8 +18,6 @@ #include "RicHoloLensCreateSessionFeature.h" -#include "RiaQIconTools.h" - #include "RicHoloLensCreateSessionUi.h" #include "RicHoloLensServerSettings.h" #include "RicHoloLensSessionManager.h" diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp index 9ee095749c..c4ce72e991 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp @@ -21,7 +21,6 @@ #include "RicHoloLensSession.h" #include "RiaApplication.h" -#include "RiaQIconTools.h" #include "RiaLogging.h" #include "RimGridView.h" diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp index bd6203a3dc..fa42404c11 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp @@ -22,7 +22,6 @@ #include "RicHoloLensSessionManager.h" #include "RiaLogging.h" -#include "RiaQIconTools.h" #include "cafCmdFeatureManager.h" diff --git a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp index 3209e03edc..fcbd0b4dd6 100644 --- a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp +++ b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp @@ -272,29 +272,6 @@ void RifEclipseDataTableFormatter::tableCompleted(const QString& appendText, boo } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifEclipseDataTableFormatter::addValueTable(QTextStream& stream, const QString& name, size_t columns, const std::vector& values) -{ - RifEclipseDataTableFormatter subFormatter(stream); - - std::vector cols(columns, RifEclipseOutputTableColumn("")); - - subFormatter.setTableRowPrependText(""); - subFormatter.keyword(name); - subFormatter.header(cols); - - int colCount = 0; - for (size_t i = 0; i < values.size(); i++) - { - subFormatter.add(values[i]); - if (++colCount % columns == 0 && i < values.size() - 1) subFormatter.rowCompleted(""); - } - subFormatter.rowCompleted(); - subFormatter.tableCompleted("", false); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h index b3676ebf50..6766d69654 100644 --- a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h +++ b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h @@ -138,8 +138,6 @@ public: void tableCompleted(); void tableCompleted(const QString& appendText, bool appendNewline); - static void addValueTable(QTextStream& stream, const QString& keyword, size_t columns, const std::vector& values); - int tableWidth() const; private: diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.cpp b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.cpp index 198a3d1575..25749f21f6 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.cpp @@ -225,14 +225,6 @@ void RimAnnotationInViewCollection::onGlobalCollectionChanged(const RimAnnotatio updateConnectedEditors(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RimAnnotationInViewCollection::annotationsCount() const -{ - return m_textAnnotations->m_annotations.size() + allGlobalPdmAnnotations().size(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.h b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.h index 013be1a3d0..28c123ed26 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.h +++ b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationInViewCollection.h @@ -58,7 +58,6 @@ public: std::vector globalPolylineFromFileAnnotations() const; void onGlobalCollectionChanged(const RimAnnotationCollection* globalCollection); - size_t annotationsCount() const; bool hasTextAnnotationsWithCustomFontSize(RiaFontCache::FontSize defaultFontSize) const; bool applyFontSizeToAllTextAnnotations(RiaFontCache::FontSize oldFontSize, RiaFontCache::FontSize fontSize, bool forceSizeChange = false); diff --git a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp index 3dedcd7478..e69d8d34e8 100644 --- a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp @@ -73,7 +73,7 @@ const std::vector& RigEclipseToStimPlanCellTransmissibilityCalculator::c } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- const std::vector& RigEclipseToStimPlanCellTransmissibilityCalculator::contributingEclipseCellIntersectionAreas() const { @@ -81,7 +81,7 @@ const std::vector& RigEclipseToStimPlanCellTransmissibilityCalculator::c } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- const std::vector& RigEclipseToStimPlanCellTransmissibilityCalculator::contributingEclipseCellPermeabilities() const { @@ -103,21 +103,6 @@ double RigEclipseToStimPlanCellTransmissibilityCalculator::areaOpenForFlow() con return area; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RigEclipseToStimPlanCellTransmissibilityCalculator::aggregatedMatrixTransmissibility() const -{ - double totalTransmissibility = 0.0; - - for (const auto& trans : m_contributingEclipseCellTransmissibilities) - { - totalTransmissibility += trans; - } - - return totalTransmissibility; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -377,5 +362,6 @@ cvf::ref const RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); // Create result accessor object for main grid at time step zero (static result date is always at first time step - return RigResultAccessorFactory::createFromResultAddress(eclipseCaseData, 0, porosityModel, 0, RigEclipseResultAddress(uiResultName)); + return RigResultAccessorFactory::createFromResultAddress( + eclipseCaseData, 0, porosityModel, 0, RigEclipseResultAddress(uiResultName)); } diff --git a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.h b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.h index e6b759c081..78711f2adb 100644 --- a/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.h +++ b/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.h @@ -58,7 +58,6 @@ public: const std::vector& contributingEclipseCellPermeabilities() const; double areaOpenForFlow() const; - double aggregatedMatrixTransmissibility() const; const RigFractureCell& fractureCell() const; From d152147fd421399425d305e79e6d8bbed969ac32 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 21 Apr 2019 08:58:21 +0200 Subject: [PATCH 11/14] #4348 System , cppcheck : Remove unused functions --- .../201-04-21-delete-unused_functions.txt | 20 ++-- .../ExportCommands/RicExportLgrFeature.cpp | 113 ------------------ .../Commands/RicCreateTemporaryLgrFeature.cpp | 9 -- .../Commands/RicCreateTemporaryLgrFeature.h | 1 - .../ReservoirDataModel/CMakeLists_files.cmake | 2 - .../RigEclipseCrossPlotDataExtractor.cpp | 2 - .../RigEclipseResultBinSorter.cpp | 79 ------------ .../RigEclipseResultBinSorter.h | 45 ------- 8 files changed, 10 insertions(+), 261 deletions(-) delete mode 100644 ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.cpp delete mode 100644 ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.h diff --git a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt index 1b2c58100d..1e3fe91b4e 100644 --- a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt +++ b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt @@ -2,6 +2,11 @@ Nothing to do ------------- +unchanged ApplicationCode\Commands\HoloLensCommands\farmhash\farmhash.cc 1948 style unusedFunction false The function 'Hash128WithSeed' is never used. +unchanged ApplicationCode\ReservoirDataModel\cvfGeometryTools.cpp 614 style unusedFunction false The function 'addMidEdgeNodes' is never used. +unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 147 style unusedFunction false The function 'cancelDownload' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 453 style unusedFunction false The function 'cellIJKFromCoordinate' is never used. +unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 486 style unusedFunction false The function 'cellMinMaxCordinates' is never used. WIP --- @@ -18,21 +23,18 @@ Must be changed Deleted ------- - -Backlog -------- -unchanged ApplicationCode\Commands\HoloLensCommands\farmhash\farmhash.cc 1948 style unusedFunction false The function 'Hash128WithSeed' is never used. -unchanged ApplicationCode\ReservoirDataModel\cvfGeometryTools.cpp 614 style unusedFunction false The function 'addMidEdgeNodes' is never used. unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 278 style unusedFunction false The function 'addValueTable' is never used. unchanged ApplicationCode\ReservoirDataModel\Completions\RigEclipseToStimPlanCellTransmissibilityCalculator.cpp 109 style unusedFunction false The function 'aggregatedMatrixTransmissibility' is never used. unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationInViewCollection.cpp 231 style unusedFunction false The function 'annotationsCount' is never used. unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 848 style unusedFunction false The function 'appendIntersectedCells' is never used. unchanged ApplicationCode\Application\Tools\RiaQIconTools.cpp 26 style unusedFunction false The function 'appendPixmapUpperLeft' is never used. unchanged ApplicationCode\ReservoirDataModel\RigEclipseResultBinSorter.cpp 48 style unusedFunction false The function 'binRange' is never used. -unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 147 style unusedFunction false The function 'cancelDownload' is never used. -unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 453 style unusedFunction false The function 'cellIJKFromCoordinate' is never used. -unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 486 style unusedFunction false The function 'cellMinMaxCordinates' is never used. unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 684 style unusedFunction false The function 'cellsIntersectingCompletion' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. + +Backlog +------- unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 527 style unusedFunction false The function 'changeEvent' is never used. unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 133 style unusedFunction false The function 'cleanupBeforeSettingPdmObject' is never used. unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 73 style unusedFunction false The function 'configureAndUpdateUi' is never used. @@ -41,7 +43,6 @@ unchanged ApplicationCode\UserInterface\RiuGridCrossQwtPlot.cpp 359 style unused unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\VdeCachingHashedIdFactory.cpp 233 style unusedFunction false The function 'crc' is never used. unchanged ApplicationCode\Application\Tools\RiaColorTables.cpp 580 style unusedFunction false The function 'createBrightnessBasedColorTable' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. unchanged ApplicationCode\GeoMech\GeoMechVisualization\RivFemPartGeometryGenerator.cpp 106 style unusedFunction false The function 'createOutlineMeshDrawable' is never used. unchanged ApplicationCode\ModelVisualization\RivWellConnectionFactorGeometryGenerator.cpp 202 style unusedFunction false The function 'createStarGeometry' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 119 style unusedFunction false The function 'createWidget' is never used. @@ -91,7 +92,6 @@ unchanged ApplicationCode\UserInterface\RiuViewer.cpp 345 style unusedFunction f unchanged ApplicationCode\ProjectDataModel\RimProject.cpp 1066 style unusedFunction false The function 'polylineAnnotations' is never used. unchanged ApplicationCode\Application\RiaApplication.cpp 326 style unusedFunction false The function 'processNonGuiEvents' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 65 style unusedFunction false The function 'recursivelyConfigureAndUpdateTopLevelUiOrdering' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. unchanged ApplicationCode\ProjectDataModel\RimScaleLegendConfig.cpp 447 style unusedFunction false The function 'setCurrentScale' is never used. diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp index 20a4c48d48..2887bf31f8 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp @@ -116,7 +116,6 @@ public: LgrNameFactory(); QString newName(RigCompletionData::CompletionType completionType); QString newName(const QString& baseName, int number); - void resetNumbering(); private: std::map> m_counters; @@ -678,108 +677,6 @@ RicExportLgrFeature::cellsIntersectingCompletions(RimEclipseCase* eclipseCase, return cells; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector cellsIntersectingCompletion(const std::map>& allCells, - caf::PdmObject* sourcePdmObject) -{ - std::vector cells; - for (const auto& intInfo : allCells) - { - for (const auto& completion : intInfo.second) - { - if (completion.sourcePdmObject() == sourcePdmObject) cells.push_back(intInfo.first); - } - } - return cells; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector>> - createOrderedIntersectionList(const std::vector& allWellPathCells, - const std::map>& completionCells) -{ - // All cell indices intersecting a completion and lookup into map - std::set complCellIndices; - std::map complCellLookup; - std::set cellsOnWellPath; - std::vector> cellsNotOnWellPath; - { - for (const auto& complCell : completionCells) - { - complCellIndices.insert(complCell.first.globalCellIndex()); - complCellLookup.insert({complCell.first.globalCellIndex(), complCell.first}); - - bool cellFoundOnWellPath = false; - for (const auto& wellPathCell : allWellPathCells) - { - if (complCell.first.globalCellIndex() == wellPathCell.globCellIndex) - { - cellsOnWellPath.insert(CellInfo(complCell.first.globalCellIndex(), wellPathCell.startMD, wellPathCell.endMD)); - cellFoundOnWellPath = true; - break; - } - } - - if (!cellFoundOnWellPath) - { - cellsNotOnWellPath.emplace_back( true, CellInfo(complCell.first.globalCellIndex()) ); - } - } - } - - std::vector>> result; - - // Walk along well path - for (const auto& cellOnWellPath : cellsOnWellPath) - { - // Add cell on well path first - auto complDataGridCell = complCellLookup.at(cellOnWellPath.globCellIndex); - auto complDataList = completionCells.at(complDataGridCell); - result.emplace_back(complDataGridCell, complDataList); - - // Check intersected completions in current cell - RigCompletionData::CompletionType complTypes[] = { RigCompletionData::FRACTURE, RigCompletionData::FISHBONES, RigCompletionData::PERFORATION }; - - for (auto complType : complTypes) - { - const caf::PdmObject* completion = nullptr; - for (const auto& complData : complDataList) - { - if (complData.completionType() == complType) - { - completion = complData.sourcePdmObject(); - break; - } - } - - if (completion) - { - // Add all cells intersecting this completion - for (auto& cellNotOnWellPath : cellsNotOnWellPath) - { - if (!cellNotOnWellPath.first) continue; - - auto complDataList2 = completionCells.at(complCellLookup.at(cellNotOnWellPath.second.globCellIndex)); - auto itr = std::find_if(complDataList2.begin(), complDataList2.end(), - [&completion](const RigCompletionData& cd) { return cd.sourcePdmObject() == completion; }); - - if (itr != complDataList2.end()) - { - result.emplace_back( complCellLookup.at(cellNotOnWellPath.second.globCellIndex), complDataList2); - cellNotOnWellPath.first = false; - } - } - } - } - } - - return result; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1042,13 +939,3 @@ QString LgrNameFactory::newName(const QString& baseName, int number) return lgrName.replace(" ", "_"); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void LgrNameFactory::resetNumbering() -{ - for (auto& counter : m_counters) - { - counter.second.second = 1; - } -} diff --git a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp index 16fa9d2aa0..d13090c4f7 100644 --- a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp +++ b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp @@ -344,12 +344,3 @@ void RicCreateTemporaryLgrFeature::computeCachedData(RimEclipseCase* eclipseCase } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateTemporaryLgrFeature::containsAnyNonMainGridCells(const std::vector& cells) -{ - return std::find_if(cells.begin(), cells.end(), [](const RigCompletionDataGridCell& cell) { - return !cell.isMainGridCell(); - }) != cells.end(); -} diff --git a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.h b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.h index 0d3864cebd..86bd89da2f 100644 --- a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.h +++ b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.h @@ -65,5 +65,4 @@ private: void createLgr(const LgrInfo& lgrInfo, RigMainGrid* mainGrid); void computeCachedData(RimEclipseCase* eclipseCase); void deleteAllCachedData(RimEclipseCase* eclipseCase); - bool containsAnyNonMainGridCells(const std::vector& cells); }; diff --git a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake index fa50149ec9..4058f706c7 100644 --- a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake +++ b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake @@ -53,7 +53,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.h ${CMAKE_CURRENT_LIST_DIR}/RigWellPathIntersectionTools.h ${CMAKE_CURRENT_LIST_DIR}/RigEclipseResultInfo.h ${CMAKE_CURRENT_LIST_DIR}/RigEclipseResultAddress.h -${CMAKE_CURRENT_LIST_DIR}/RigEclipseResultBinSorter.h ${CMAKE_CURRENT_LIST_DIR}/RigTofAccumulatedPhaseFractionsCalculator.h ${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityEquations.h ${CMAKE_CURRENT_LIST_DIR}/RigNumberOfFloodedPoreVolumesCalculator.h @@ -122,7 +121,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RigTesselatorTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellPathIntersectionTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigEclipseResultInfo.cpp -${CMAKE_CURRENT_LIST_DIR}/RigEclipseResultBinSorter.cpp ${CMAKE_CURRENT_LIST_DIR}/RigTofAccumulatedPhaseFractionsCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityEquations.cpp ${CMAKE_CURRENT_LIST_DIR}/RigNumberOfFloodedPoreVolumesCalculator.cpp diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp index 0bb217e274..64e408278b 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp @@ -24,7 +24,6 @@ #include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" #include "RigEclipseResultAddress.h" -#include "RigEclipseResultBinSorter.h" #include "RigFormationNames.h" #include "RigMainGrid.h" @@ -49,7 +48,6 @@ RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract(RigEclipseCa RigFormationNames* activeFormationNames = resultData->activeFormationNames(); - std::unique_ptr catBinSorter; const std::vector>* catValuesForAllSteps = nullptr; if (xAddress.isValid() && yAddress.isValid()) diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.cpp deleted file mode 100644 index 5b6600af12..0000000000 --- a/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.cpp +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2019- Equinor ASA -// -// ResInsight is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// -#include "RigEclipseResultBinSorter.h" - -#include -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigEclipseResultBinSorter::RigEclipseResultBinSorter(const std::vector>& allDataValues, int binCount) - : m_allDataValues(allDataValues) - , m_binCount(binCount) - , m_minValue(std::numeric_limits::infinity()) - , m_maxValue(-std::numeric_limits::infinity()) - , m_binSize(0.0) -{ - calculateRange(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -int RigEclipseResultBinSorter::binNumber(double value) const -{ - double distFromMin = value - m_minValue; - return std::min(m_binCount - 1, static_cast(distFromMin / m_binSize)); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::pair RigEclipseResultBinSorter::binRange(int binNumber) const -{ - double minBinValue = m_minValue + m_binSize * binNumber; - double maxBinBalue = minBinValue + m_binSize; - return std::make_pair(minBinValue, maxBinBalue); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigEclipseResultBinSorter::calculateRange() -{ - for (const std::vector& doubleRange : m_allDataValues) - { - if (!doubleRange.empty()) - { - for (double value : doubleRange) - { - if (value != std::numeric_limits::infinity()) - { - m_minValue = std::min(m_minValue, value); - m_maxValue = std::max(m_maxValue, value); - } - } - } - } - - if (m_maxValue > m_minValue) - { - m_binSize = (m_maxValue - m_minValue) / m_binCount; - } -} diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.h b/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.h deleted file mode 100644 index 6f49beb1d9..0000000000 --- a/ApplicationCode/ReservoirDataModel/RigEclipseResultBinSorter.h +++ /dev/null @@ -1,45 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2019- Equinor ASA -// -// ResInsight is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// -#pragma once - -#include -#include - -//================================================================================================== -/// -/// -//================================================================================================== -class RigEclipseResultBinSorter -{ -public: - RigEclipseResultBinSorter(const std::vector>& allDataValues, int binCount); - - int binNumber(double value) const; - std::pair binRange(int binNumber) const; - -private: - void calculateRange(); - -private: - const std::vector>& m_allDataValues; - int m_binCount; - double m_minValue; - double m_maxValue; - double m_binSize; -}; - From 8d4142187e41e699fdd7f1a61c4aba5cd429ecb2 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 21 Apr 2019 09:11:20 +0200 Subject: [PATCH 12/14] #4348 System , cppcheck : Remove unused functions --- .../201-04-21-delete-unused_functions.txt | 23 +++++++------- .../Application/Tools/RiaColorTools.cpp | 14 --------- .../Application/Tools/RiaColorTools.h | 2 +- .../Completions/RimPerforationInterval.cpp | 8 ----- .../Completions/RimPerforationInterval.h | 1 - .../RimGridCrossPlotDataSet.cpp | 13 -------- .../GridCrossPlots/RimGridCrossPlotDataSet.h | 1 - .../ProjectDataModel/Rim3dView.cpp | 9 ------ ApplicationCode/ProjectDataModel/Rim3dView.h | 1 - .../ReservoirDataModel/RigMainGrid.cpp | 30 ------------------- .../ReservoirDataModel/RigMainGrid.h | 1 - 11 files changed, 13 insertions(+), 90 deletions(-) diff --git a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt index 1e3fe91b4e..b977429819 100644 --- a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt +++ b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt @@ -7,9 +7,15 @@ unchanged ApplicationCode\ReservoirDataModel\cvfGeometryTools.cpp 614 style unus unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 147 style unusedFunction false The function 'cancelDownload' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 453 style unusedFunction false The function 'cellIJKFromCoordinate' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 486 style unusedFunction false The function 'cellMinMaxCordinates' is never used. +unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 527 style unusedFunction false The function 'changeEvent' is never used. +unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 133 style unusedFunction false The function 'cleanupBeforeSettingPdmObject' is never used. +unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 73 style unusedFunction false The function 'configureAndUpdateUi' is never used. WIP --- +unchanged ApplicationCode\UserInterface\RiuGridCrossQwtPlot.cpp 359 style unusedFunction false The function 'contextMenuEvent' is never used. +unchanged ApplicationCode\Commands\HoloLensCommands\VdeCachingHashedIdFactory.cpp 233 style unusedFunction false The function 'crc' is never used. +unchanged ApplicationCode\Application\Tools\RiaColorTables.cpp 580 style unusedFunction false The function 'createBrightnessBasedColorTable' is never used. Candidate for later use @@ -32,17 +38,14 @@ unchanged ApplicationCode\ReservoirDataModel\RigEclipseResultBinSorter.cpp 48 st unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 684 style unusedFunction false The function 'cellsIntersectingCompletion' is never used. unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. +unchanged ApplicationCode\Commands\RicCreateTemporaryLgrFeature.cpp 350 style unusedFunction false The function 'containsAnyNonMainGridCells' is never used. +unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. +unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. Backlog ------- -unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 527 style unusedFunction false The function 'changeEvent' is never used. -unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 133 style unusedFunction false The function 'cleanupBeforeSettingPdmObject' is never used. -unchanged ApplicationCode\Commands\AnnotationCommands\RicTextAnnotation3dEditor.cpp 73 style unusedFunction false The function 'configureAndUpdateUi' is never used. -unchanged ApplicationCode\Commands\RicCreateTemporaryLgrFeature.cpp 350 style unusedFunction false The function 'containsAnyNonMainGridCells' is never used. -unchanged ApplicationCode\UserInterface\RiuGridCrossQwtPlot.cpp 359 style unusedFunction false The function 'contextMenuEvent' is never used. -unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. -unchanged ApplicationCode\Commands\HoloLensCommands\VdeCachingHashedIdFactory.cpp 233 style unusedFunction false The function 'crc' is never used. -unchanged ApplicationCode\Application\Tools\RiaColorTables.cpp 580 style unusedFunction false The function 'createBrightnessBasedColorTable' is never used. unchanged ApplicationCode\GeoMech\GeoMechVisualization\RivFemPartGeometryGenerator.cpp 106 style unusedFunction false The function 'createOutlineMeshDrawable' is never used. unchanged ApplicationCode\ModelVisualization\RivWellConnectionFactorGeometryGenerator.cpp 202 style unusedFunction false The function 'createStarGeometry' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 119 style unusedFunction false The function 'createWidget' is never used. @@ -56,9 +59,7 @@ unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 254 style unusedFunction unchanged ApplicationCode\FileInterface\RifEclipseSummaryTools.cpp 123 style unusedFunction false The function 'dumpMetaData' is never used. unchanged ApplicationCode\FileInterface\RifJsonEncodeDecode.cpp 45 style unusedFunction false The function 'dumpToFile' is never used. unchanged ApplicationCode\GeoMech\OdbReader\RifOdbReader.cpp 551 style unusedFunction false The function 'elementSet' is never used. -unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. -unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. -unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. + unchanged ApplicationCode\Application\RiaEclipseFileNameTools.cpp 73 style unusedFunction false The function 'findRelatedDataFile' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\VdeArrayDataPacket.cpp 221 style unusedFunction false The function 'fromRawPacketBuffer' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 503 style unusedFunction false The function 'gridPointCoordinate' is never used. diff --git a/ApplicationCode/Application/Tools/RiaColorTools.cpp b/ApplicationCode/Application/Tools/RiaColorTools.cpp index 52507a7931..fbbec44c89 100644 --- a/ApplicationCode/Application/Tools/RiaColorTools.cpp +++ b/ApplicationCode/Application/Tools/RiaColorTools.cpp @@ -141,20 +141,6 @@ cvf::Color3f RiaColorTools::fromQColorTo3f(QColor color) return cvf::Color3f(color.redF(), color.greenF(), color.blueF()); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -float RiaColorTools::contrastRatio(cvf::Color3f color1, cvf::Color3f color2) -{ - float L1 = relativeLuminance(color1); - float L2 = relativeLuminance(color2); - - float Lmin = std::min(L1, L2); - float Lmax = std::max(L1, L2); - - return (Lmax + 0.05) / (Lmin + 0.05); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Application/Tools/RiaColorTools.h b/ApplicationCode/Application/Tools/RiaColorTools.h index 0d1daa0e9a..e99221325b 100644 --- a/ApplicationCode/Application/Tools/RiaColorTools.h +++ b/ApplicationCode/Application/Tools/RiaColorTools.h @@ -42,7 +42,7 @@ public: static QColor toQColor(cvf::Color3f color, float alpha = 1.0f); static QColor toQColor(cvf::Color4f color); static cvf::Color3f fromQColorTo3f(QColor); - static float contrastRatio(cvf::Color3f color1, cvf::Color3f color2); + private: static float relativeLuminance(cvf::Color3f backgroundColor); static float calculateNonLinearColorValue(float colorFraction); diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp index 5768577771..6f2fbbae8b 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp @@ -99,14 +99,6 @@ void RimPerforationInterval::setCustomStartDate(const QDate& date) } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPerforationInterval::enableCustomEndDate(bool enable) -{ - m_useCustomEndDate = enable; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h index 49e5ab8dd6..24e173f4e1 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h @@ -52,7 +52,6 @@ public: void enableCustomStartDate(bool enable); void setCustomStartDate(const QDate& date); - void enableCustomEndDate(bool enable); void setCustomEndDate(const QDate& date); void setDiameter(double diameter); diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp index 4a1e282ce0..c1ffd386ac 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp @@ -394,19 +394,6 @@ QString RimGridCrossPlotDataSet::timeStepString() const return ""; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RimGridCrossPlotDataSet::groupStrings() const -{ - std::vector groupStrings; - for (auto curve : m_crossPlotCurves()) - { - groupStrings.push_back(legendConfig()->categoryNameFromCategoryValue(curve->groupIndex())); - } - return groupStrings; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.h b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.h index 21015596a6..de057c0ef8 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.h +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.h @@ -113,7 +113,6 @@ public: QString caseNameString() const; QString axisVariableString() const; QString timeStepString() const; - std::vector groupStrings() const; std::map nameComponents() const; diff --git a/ApplicationCode/ProjectDataModel/Rim3dView.cpp b/ApplicationCode/ProjectDataModel/Rim3dView.cpp index daaaeb9169..6e99c2102c 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dView.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dView.cpp @@ -1093,15 +1093,6 @@ void Rim3dView::disablePerspectiveProjectionField() RiaFieldhandleTools::disableWriteAndSetFieldHidden(&isPerspectiveView); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void Rim3dView::enablePerspectiveProjectionField() -{ - isPerspectiveView.uiCapability()->setUiHidden(false); - isPerspectiveView.xmlCapability()->setIOWritable(true); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Rim3dView.h b/ApplicationCode/ProjectDataModel/Rim3dView.h index 8b91af6eb9..584ce63f75 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dView.h +++ b/ApplicationCode/ProjectDataModel/Rim3dView.h @@ -166,7 +166,6 @@ protected: virtual void setDefaultView(); void disableGridBoxField(); void disablePerspectiveProjectionField(); - void enablePerspectiveProjectionField(); cvf::Mat4d cameraPosition() const; cvf::Vec3d cameraPointOfInterest() const; RimViewNameConfig* nameConfig() const; diff --git a/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp b/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp index b8e313466b..e9223343e8 100644 --- a/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp +++ b/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp @@ -160,36 +160,6 @@ size_t RigMainGrid::findReservoirCellIndexFromPoint(const cvf::Vec3d& point) con return cellContainingPoint; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RigMainGrid::findAllReservoirCellIndicesMatching2dPoint(const cvf::Vec2d& point2d) const -{ - cvf::BoundingBox gridBoundingVox = boundingBox(); - cvf::Vec3d highestPoint(point2d, gridBoundingVox.max().z()); - cvf::Vec3d lowestPoint(point2d, gridBoundingVox.min().z()); - - cvf::BoundingBox rayBBox; - rayBBox.add(highestPoint); - rayBBox.add(lowestPoint); - - std::vector cellIndices; - m_mainGrid->findIntersectingCells(rayBBox, &cellIndices); - - cvf::Vec3d hexCorners[8]; - for (size_t cellIndex : cellIndices) - { - m_mainGrid->cellCornerVertices(cellIndex, hexCorners); - - if (RigHexIntersectionTools::lineIntersectsHexCell(highestPoint, lowestPoint, hexCorners)) - { - cellIndices.push_back(cellIndex); - } - } - - return cellIndices; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigMainGrid.h b/ApplicationCode/ReservoirDataModel/RigMainGrid.h index 398b02105d..c0d64da439 100644 --- a/ApplicationCode/ReservoirDataModel/RigMainGrid.h +++ b/ApplicationCode/ReservoirDataModel/RigMainGrid.h @@ -58,7 +58,6 @@ public: const RigCell& cellByGridAndGridLocalCellIdx(size_t gridIdx, size_t gridLocalCellIdx) const; size_t reservoirCellIndexByGridAndGridLocalCellIndex(size_t gridIdx, size_t gridLocalCellIdx) const; size_t findReservoirCellIndexFromPoint(const cvf::Vec3d& point) const; - std::vector findAllReservoirCellIndicesMatching2dPoint(const cvf::Vec2d& point2d) const; void addLocalGrid(RigLocalGrid* localGrid); size_t gridCountOnFile() const; From 843a791218aee4ef407c9ef6db6c8fc6aefbf64c Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 21 Apr 2019 09:28:23 +0200 Subject: [PATCH 13/14] #4348 System , cppcheck : Remove unused functions --- .../201-04-21-delete-unused_functions.txt | 24 +++++++------- .../RimAnnotationTextAppearance.cpp | 16 --------- .../Annotations/RimAnnotationTextAppearance.h | 2 -- .../RimPolylinesAnnotationInView.cpp | 8 ----- .../RimPolylinesAnnotationInView.h | 1 - .../RimUserDefinedPolylinesAnnotation.cpp | 16 --------- .../Completions/RimSimWellFracture.cpp | 10 ------ .../Completions/RimSimWellFracture.h | 1 - .../RimContourMapProjection.cpp | 33 ------------------- .../RimContourMapProjection.h | 4 --- .../ReservoirDataModel/RigLocalGrid.cpp | 17 ---------- .../ReservoirDataModel/RigLocalGrid.h | 4 --- 12 files changed, 12 insertions(+), 124 deletions(-) diff --git a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt index b977429819..0a56f5485c 100644 --- a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt +++ b/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt @@ -43,6 +43,17 @@ unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFu unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. +unchanged ApplicationCode\ProjectDataModel\GridCrossPlots\RimGridCrossPlotDataSet.cpp 400 style unusedFunction false The function 'groupStrings' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 354 style unusedFunction false The function 'hasResultAtVertex' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 1417 style unusedFunction false The function 'isSummationResult' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 255 style unusedFunction false The function 'showContourLabels' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 42 style unusedFunction false The function 'xydToXyzVector' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimSimWellFracture.cpp 117 style unusedFunction false The function 'wellDipAtFracturePosition' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigLocalGrid.cpp 65 style unusedFunction false The function 'setPositionInParentGrid' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimPolylinesAnnotationInView.cpp 66 style unusedFunction false The function 'setSourceAnnotation' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 59 style unusedFunction false The function 'setFontColor' is never used. Backlog ------- @@ -59,22 +70,18 @@ unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 254 style unusedFunction unchanged ApplicationCode\FileInterface\RifEclipseSummaryTools.cpp 123 style unusedFunction false The function 'dumpMetaData' is never used. unchanged ApplicationCode\FileInterface\RifJsonEncodeDecode.cpp 45 style unusedFunction false The function 'dumpToFile' is never used. unchanged ApplicationCode\GeoMech\OdbReader\RifOdbReader.cpp 551 style unusedFunction false The function 'elementSet' is never used. - unchanged ApplicationCode\Application\RiaEclipseFileNameTools.cpp 73 style unusedFunction false The function 'findRelatedDataFile' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\VdeArrayDataPacket.cpp 221 style unusedFunction false The function 'fromRawPacketBuffer' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 503 style unusedFunction false The function 'gridPointCoordinate' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 362 style unusedFunction false The function 'gridPointCountI' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 371 style unusedFunction false The function 'gridPointCountJ' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 494 style unusedFunction false The function 'gridPointIndexFromIJK' is never used. -unchanged ApplicationCode\ProjectDataModel\GridCrossPlots\RimGridCrossPlotDataSet.cpp 400 style unusedFunction false The function 'groupStrings' is never used. unchanged ApplicationCode\UserInterface\RiuCadNavigation.cpp 49 style unusedFunction false The function 'handleInputEvent' is never used. unchanged ApplicationCode\Commands\Ric3dViewPickEventHandler.cpp 42 style unusedFunction false The function 'handlePickEvent' is never used. unchanged ApplicationCode\ProjectDataModel\RimMimeData.cpp 56 style unusedFunction false The function 'hasFormat' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 354 style unusedFunction false The function 'hasResultAtVertex' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\VdeArrayDataPacket.cpp 173 style unusedFunction false The function 'imageComponentCount' is never used. unchanged ApplicationCode\Application\Tools\RiaImageFileCompare.cpp 126 style unusedFunction false The function 'imagesEqual' is never used. unchanged ApplicationCode\WellPathImportSsihub\RiuWellImportWizard.cpp 760 style unusedFunction false The function 'initializePage' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 1417 style unusedFunction false The function 'isSummationResult' is never used. unchanged ApplicationCode\UserInterface\RiuViewer.cpp 860 style unusedFunction false The function 'leaveEvent' is never used. unchanged ApplicationCode\GeoMech\GeoMechDataModel\RigFemPartGrid.cpp 405 style unusedFunction false The function 'maxCoordinate' is never used. unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 332 style unusedFunction false The function 'mimeTypes' is never used. @@ -93,19 +100,14 @@ unchanged ApplicationCode\UserInterface\RiuViewer.cpp 345 style unusedFunction f unchanged ApplicationCode\ProjectDataModel\RimProject.cpp 1066 style unusedFunction false The function 'polylineAnnotations' is never used. unchanged ApplicationCode\Application\RiaApplication.cpp 326 style unusedFunction false The function 'processNonGuiEvents' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 65 style unusedFunction false The function 'recursivelyConfigureAndUpdateTopLevelUiOrdering' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. + unchanged ApplicationCode\ProjectDataModel\RimScaleLegendConfig.cpp 447 style unusedFunction false The function 'setCurrentScale' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 59 style unusedFunction false The function 'setFontColor' is never used. unchanged ApplicationCode\ProjectDataModel\RimEclipseResultDefinition.cpp 755 style unusedFunction false The function 'setFromEclipseResultAddress' is never used. unchanged ApplicationCode\ProjectDataModel\Rim3dOverlayInfoConfig.cpp 278 style unusedFunction false The function 'setIsActive' is never used. unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 137 style unusedFunction false The function 'setMaxDataRowWidth' is never used. -unchanged ApplicationCode\ReservoirDataModel\RigLocalGrid.cpp 65 style unusedFunction false The function 'setPositionInParentGrid' is never used. unchanged ApplicationCode\ProjectDataModel\RimRegularLegendConfig.cpp 737 style unusedFunction false The function 'setShowLegend' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimPolylinesAnnotationInView.cpp 66 style unusedFunction false The function 'setSourceAnnotation' is never used. unchanged ApplicationCode\ProjectDataModel\Completions\RimWellPathAicdParameters.cpp 189 style unusedFunction false The function 'setUnitLabels' is never used. unchanged ApplicationCode\ProjectDataModel\Flow\RimWellPltPlot.cpp 1067 style unusedFunction false The function 'setupBeforeSave' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 255 style unusedFunction false The function 'showContourLabels' is never used. unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 519 style unusedFunction false The function 'showEvent' is never used. unchanged ApplicationCode\ReservoirDataModel\RigSimulationWellCenterLineCalculator.cpp 1064 style unusedFunction false The function 'splitIntoBranches' is never used. unchanged ApplicationCode\UserInterface\RiuDragDrop.cpp 126 style unusedFunction false The function 'supportedDropActions' is never used. @@ -113,9 +115,7 @@ unchanged ApplicationCode\ReservoirDataModel\RigFlowDiagResultAddress.cpp 67 sty unchanged ApplicationCode\Commands\CrossSectionCommands\RicAppendIntersectionFeature.cpp 121 style unusedFunction false The function 'undo' is never used. unchanged ApplicationCode\ModelVisualization\RivCellEdgeEffectGenerator.cpp 281 style unusedFunction false The function 'updateForFixedFunctionRendering' is never used. unchanged ApplicationCode\ModelVisualization\RivCellEdgeEffectGenerator.cpp 135 style unusedFunction false The function 'updateForShaderBasedRendering' is never used. -unchanged ApplicationCode\ProjectDataModel\Completions\RimSimWellFracture.cpp 117 style unusedFunction false The function 'wellDipAtFracturePosition' is never used. unchanged ApplicationCode\UnitTests\ListKeywordsForObjectsAndFields-Test.cpp 16 style unusedFunction false The function 'writeTextToFile' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 42 style unusedFunction false The function 'xydToXyzVector' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\RicHoloLensSessionManager.h 47 style unusedPrivateFunction false Unused private function: 'RicHoloLensSessionManager::handleSessionNotification' unchanged ApplicationCode\Commands\HoloLensCommands\VdeVizDataExtractor.h 106 style unusedPrivateFunction false Unused private function: 'VdeVizDataExtractor::debugComparePackets' unchanged ApplicationCode\FileInterface\RifCaseRealizationParametersReader.h 101 style unusedPrivateFunction false Unused private function: 'RifCaseRealizationRunspecificationReader::closeDataStream' diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.cpp b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.cpp index 3cba0b95db..4d1ef9b3c5 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.cpp +++ b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.cpp @@ -53,14 +53,6 @@ void RimAnnotationTextAppearance::setFontSize(FontSize size) m_fontSize = size; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimAnnotationTextAppearance::setFontColor(const cvf::Color3f& newColor) -{ - m_fontColor = newColor; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -69,14 +61,6 @@ void RimAnnotationTextAppearance::setBackgroundColor(const cvf::Color3f& newColo m_backgroundColor = newColor; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimAnnotationTextAppearance::setAnchorLineColor(const cvf::Color3f& newColor) -{ - m_anchorLineColor = newColor; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.h b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.h index bb6720cd1f..9193b18ee7 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.h +++ b/ApplicationCode/ProjectDataModel/Annotations/RimAnnotationTextAppearance.h @@ -42,9 +42,7 @@ public: RimAnnotationTextAppearance(); void setFontSize(FontSize size); - void setFontColor(const cvf::Color3f& newColor); void setBackgroundColor(const cvf::Color3f& newColor); - void setAnchorLineColor(const cvf::Color3f& newColor); FontSize fontSize() const; cvf::Color3f fontColor() const; diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.cpp b/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.cpp index c49bc2595b..4966371844 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.cpp +++ b/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.cpp @@ -60,14 +60,6 @@ bool RimPolylinesAnnotationInView::isActive() const return m_isActive(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPolylinesAnnotationInView::setSourceAnnotation(RimPolylinesAnnotation* annotation) -{ - m_sourceAnnotation = annotation; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.h b/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.h index 8d2b97d838..b5076185b1 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.h +++ b/ApplicationCode/ProjectDataModel/Annotations/RimPolylinesAnnotationInView.h @@ -56,7 +56,6 @@ public: ~RimPolylinesAnnotationInView() override {} bool isActive() const; - void setSourceAnnotation(RimPolylinesAnnotation* annotation); RimPolylinesAnnotation* sourceAnnotation() const; bool isVisible() const; diff --git a/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp b/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp index 8ffaacf46b..98fd260929 100644 --- a/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp +++ b/ApplicationCode/ProjectDataModel/Annotations/RimUserDefinedPolylinesAnnotation.cpp @@ -36,22 +36,6 @@ #include "cafPdmUiPushButtonEditor.h" #include "cafPdmUiTreeOrdering.h" -//-------------------------------------------------------------------------------------------------- -/// Internal function -//-------------------------------------------------------------------------------------------------- -std::vector xydToXyzVector(const std::vector& xyds) -{ - std::vector xyzs; - for (const auto& xyd : xyds) - { - auto xyz = xyd; - xyz.z() = -xyd.z(); - xyzs.push_back(xyz); - } - return xyzs; -} - - CAF_PDM_SOURCE_INIT(RimUserDefinedPolylinesAnnotation, "UserDefinedPolylinesAnnotation"); //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp index ca93a9cfe7..8d74330b46 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp @@ -111,16 +111,6 @@ double RimSimWellFracture::wellAzimuthAtFracturePosition() const return simWellAzimuth; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RimSimWellFracture::wellDipAtFracturePosition() -{ - computeSimWellBranchesIfRequired(); - double simWellDip = m_branchCenterLines[m_branchIndex].simWellDipAngle(fracturePosition()); - return simWellDip; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.h b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.h index 64535e3332..ac1e5c2952 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.h @@ -42,7 +42,6 @@ public: void updateAzimuthBasedOnWellAzimuthAngle() override; double wellAzimuthAtFracturePosition() const override; - double wellDipAtFracturePosition(); double fractureMD() const override { return m_location; diff --git a/ApplicationCode/ProjectDataModel/RimContourMapProjection.cpp b/ApplicationCode/ProjectDataModel/RimContourMapProjection.cpp index 0f45b5907a..e60aab03c1 100644 --- a/ApplicationCode/ProjectDataModel/RimContourMapProjection.cpp +++ b/ApplicationCode/ProjectDataModel/RimContourMapProjection.cpp @@ -217,14 +217,6 @@ const std::vector& RimContourMapProjection::trianglesWithVertexValue return m_trianglesWithVertexValues; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimContourMapProjection::ResultAggregation RimContourMapProjection::resultAggregation() const -{ - return m_resultAggregation(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -249,14 +241,6 @@ bool RimContourMapProjection::showContourLines() const return m_showContourLines(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimContourMapProjection::showContourLabels() const -{ - return m_showContourLines() && m_showContourLabels(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -348,15 +332,6 @@ double RimContourMapProjection::valueAtVertex(uint i, uint j) const return std::numeric_limits::infinity(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimContourMapProjection::hasResultAtVertex(uint i, uint j) const -{ - size_t index = vertexIndexFromIJ(i, j); - return m_aggregatedVertexResults[index] != std::numeric_limits::infinity(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1411,14 +1386,6 @@ bool RimContourMapProjection::isMeanResult() const m_resultAggregation() == RESULTS_GEOM_VALUE; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimContourMapProjection::isSummationResult() const -{ - return isStraightSummationResult() || m_resultAggregation() == RESULTS_VOLUME_SUM; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimContourMapProjection.h b/ApplicationCode/ProjectDataModel/RimContourMapProjection.h index e971366cfc..e8a5dfd851 100644 --- a/ApplicationCode/ProjectDataModel/RimContourMapProjection.h +++ b/ApplicationCode/ProjectDataModel/RimContourMapProjection.h @@ -83,11 +83,9 @@ public: const std::vector& contourPolygons() const; const std::vector& trianglesWithVertexValues(); - ResultAggregation resultAggregation() const; double sampleSpacing() const; double sampleSpacingFactor() const; bool showContourLines() const; - bool showContourLabels() const; QString resultAggregationText() const; @@ -103,7 +101,6 @@ public: bool isColumnResult() const; double valueAtVertex(uint i, uint j) const; - bool hasResultAtVertex(uint i, uint j) const; uint numberOfCells() const; uint numberOfValidCells() const; @@ -171,7 +168,6 @@ protected: const std::vector& weightingResultValues) const; bool isMeanResult() const; - bool isSummationResult() const; bool isStraightSummationResult() const; static bool isStraightSummationResult(ResultAggregationEnum aggregationType); diff --git a/ApplicationCode/ReservoirDataModel/RigLocalGrid.cpp b/ApplicationCode/ReservoirDataModel/RigLocalGrid.cpp index 0a597ec0f2..84d48e8045 100644 --- a/ApplicationCode/ReservoirDataModel/RigLocalGrid.cpp +++ b/ApplicationCode/ReservoirDataModel/RigLocalGrid.cpp @@ -23,7 +23,6 @@ RigLocalGrid::RigLocalGrid(RigMainGrid* mainGrid): RigGridBase(mainGrid), m_parentGrid(nullptr), - m_positionInParentGrid(cvf::UNDEFINED_SIZE_T), m_isTempGrid(false), m_associatedWellPathName("") { @@ -51,22 +50,6 @@ void RigLocalGrid::setParentGrid(RigGridBase * parentGrid) m_parentGrid = parentGrid; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RigLocalGrid::positionInParentGrid() const -{ - return m_positionInParentGrid; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigLocalGrid::setPositionInParentGrid(size_t positionInParentGrid) -{ - m_positionInParentGrid = positionInParentGrid; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigLocalGrid.h b/ApplicationCode/ReservoirDataModel/RigLocalGrid.h index 2ce563522b..2f7a250e3f 100644 --- a/ApplicationCode/ReservoirDataModel/RigLocalGrid.h +++ b/ApplicationCode/ReservoirDataModel/RigLocalGrid.h @@ -28,9 +28,6 @@ public: RigGridBase * parentGrid() const; void setParentGrid(RigGridBase * parentGrid); - size_t positionInParentGrid() const; - void setPositionInParentGrid(size_t positionInParentGrid); - void setAsTempGrid(bool isTemp); bool isTempGrid() const override; @@ -39,7 +36,6 @@ public: private: RigGridBase * m_parentGrid; - size_t m_positionInParentGrid; bool m_isTempGrid; std::string m_associatedWellPathName; }; From 3d3e6064b146d093dfab692b79deeb47ef3e7255 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 21 Apr 2019 09:36:25 +0200 Subject: [PATCH 14/14] #4348 System , cppcheck : Remove unused functions --- ...=> 2019-04-21-delete-unused_functions.txt} | 91 +++++++++---------- .../RifEclipseDataTableFormatter.cpp | 8 -- .../RifEclipseDataTableFormatter.h | 1 - .../Rim3dOverlayInfoConfig.cpp | 8 -- .../ProjectDataModel/Rim3dOverlayInfoConfig.h | 1 - .../RimRegularLegendConfig.cpp | 8 -- .../ProjectDataModel/RimRegularLegendConfig.h | 1 - .../ProjectDataModel/RimScaleLegendConfig.cpp | 11 --- .../ProjectDataModel/RimScaleLegendConfig.h | 4 - 9 files changed, 45 insertions(+), 88 deletions(-) rename ApplicationCode/Adm/sourceCodeMaintenance/{201-04-21-delete-unused_functions.txt => 2019-04-21-delete-unused_functions.txt} (99%) diff --git a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt b/ApplicationCode/Adm/sourceCodeMaintenance/2019-04-21-delete-unused_functions.txt similarity index 99% rename from ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt rename to ApplicationCode/Adm/sourceCodeMaintenance/2019-04-21-delete-unused_functions.txt index 0a56f5485c..c580631be2 100644 --- a/ApplicationCode/Adm/sourceCodeMaintenance/201-04-21-delete-unused_functions.txt +++ b/ApplicationCode/Adm/sourceCodeMaintenance/2019-04-21-delete-unused_functions.txt @@ -16,47 +16,6 @@ WIP unchanged ApplicationCode\UserInterface\RiuGridCrossQwtPlot.cpp 359 style unusedFunction false The function 'contextMenuEvent' is never used. unchanged ApplicationCode\Commands\HoloLensCommands\VdeCachingHashedIdFactory.cpp 233 style unusedFunction false The function 'crc' is never used. unchanged ApplicationCode\Application\Tools\RiaColorTables.cpp 580 style unusedFunction false The function 'createBrightnessBasedColorTable' is never used. - - -Candidate for later use ------------------------ - -Issue on GitHub ----- - -Must be changed ----------------- - -Deleted -------- -unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 278 style unusedFunction false The function 'addValueTable' is never used. -unchanged ApplicationCode\ReservoirDataModel\Completions\RigEclipseToStimPlanCellTransmissibilityCalculator.cpp 109 style unusedFunction false The function 'aggregatedMatrixTransmissibility' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationInViewCollection.cpp 231 style unusedFunction false The function 'annotationsCount' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 848 style unusedFunction false The function 'appendIntersectedCells' is never used. -unchanged ApplicationCode\Application\Tools\RiaQIconTools.cpp 26 style unusedFunction false The function 'appendPixmapUpperLeft' is never used. -unchanged ApplicationCode\ReservoirDataModel\RigEclipseResultBinSorter.cpp 48 style unusedFunction false The function 'binRange' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 684 style unusedFunction false The function 'cellsIntersectingCompletion' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. -unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. -unchanged ApplicationCode\Commands\RicCreateTemporaryLgrFeature.cpp 350 style unusedFunction false The function 'containsAnyNonMainGridCells' is never used. -unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. -unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. -unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. -unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. -unchanged ApplicationCode\ProjectDataModel\GridCrossPlots\RimGridCrossPlotDataSet.cpp 400 style unusedFunction false The function 'groupStrings' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 354 style unusedFunction false The function 'hasResultAtVertex' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 1417 style unusedFunction false The function 'isSummationResult' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. -unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 255 style unusedFunction false The function 'showContourLabels' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 42 style unusedFunction false The function 'xydToXyzVector' is never used. -unchanged ApplicationCode\ProjectDataModel\Completions\RimSimWellFracture.cpp 117 style unusedFunction false The function 'wellDipAtFracturePosition' is never used. -unchanged ApplicationCode\ReservoirDataModel\RigLocalGrid.cpp 65 style unusedFunction false The function 'setPositionInParentGrid' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimPolylinesAnnotationInView.cpp 66 style unusedFunction false The function 'setSourceAnnotation' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. -unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 59 style unusedFunction false The function 'setFontColor' is never used. - -Backlog -------- unchanged ApplicationCode\GeoMech\GeoMechVisualization\RivFemPartGeometryGenerator.cpp 106 style unusedFunction false The function 'createOutlineMeshDrawable' is never used. unchanged ApplicationCode\ModelVisualization\RivWellConnectionFactorGeometryGenerator.cpp 202 style unusedFunction false The function 'createStarGeometry' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 119 style unusedFunction false The function 'createWidget' is never used. @@ -100,12 +59,7 @@ unchanged ApplicationCode\UserInterface\RiuViewer.cpp 345 style unusedFunction f unchanged ApplicationCode\ProjectDataModel\RimProject.cpp 1066 style unusedFunction false The function 'polylineAnnotations' is never used. unchanged ApplicationCode\Application\RiaApplication.cpp 326 style unusedFunction false The function 'processNonGuiEvents' is never used. unchanged ApplicationCode\Commands\SummaryPlotCommands\RicSummaryCurveCalculatorEditor.cpp 65 style unusedFunction false The function 'recursivelyConfigureAndUpdateTopLevelUiOrdering' is never used. - -unchanged ApplicationCode\ProjectDataModel\RimScaleLegendConfig.cpp 447 style unusedFunction false The function 'setCurrentScale' is never used. unchanged ApplicationCode\ProjectDataModel\RimEclipseResultDefinition.cpp 755 style unusedFunction false The function 'setFromEclipseResultAddress' is never used. -unchanged ApplicationCode\ProjectDataModel\Rim3dOverlayInfoConfig.cpp 278 style unusedFunction false The function 'setIsActive' is never used. -unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 137 style unusedFunction false The function 'setMaxDataRowWidth' is never used. -unchanged ApplicationCode\ProjectDataModel\RimRegularLegendConfig.cpp 737 style unusedFunction false The function 'setShowLegend' is never used. unchanged ApplicationCode\ProjectDataModel\Completions\RimWellPathAicdParameters.cpp 189 style unusedFunction false The function 'setUnitLabels' is never used. unchanged ApplicationCode\ProjectDataModel\Flow\RimWellPltPlot.cpp 1067 style unusedFunction false The function 'setupBeforeSave' is never used. unchanged ApplicationCode\UserInterface\RiuWellLogPlot.cpp 519 style unusedFunction false The function 'showEvent' is never used. @@ -120,3 +74,48 @@ unchanged ApplicationCode\Commands\HoloLensCommands\RicHoloLensSessionManager.h unchanged ApplicationCode\Commands\HoloLensCommands\VdeVizDataExtractor.h 106 style unusedPrivateFunction false Unused private function: 'VdeVizDataExtractor::debugComparePackets' unchanged ApplicationCode\FileInterface\RifCaseRealizationParametersReader.h 101 style unusedPrivateFunction false Unused private function: 'RifCaseRealizationRunspecificationReader::closeDataStream' unchanged ApplicationCode\ReservoirDataModel\RigSimulationWellCenterLineCalculator.h 52 style unusedPrivateFunction false Unused private function: 'RigSimulationWellCenterLineCalculator::splitIntoBranches' + + +Candidate for later use +----------------------- + +Issue on GitHub +---- + +Must be changed +---------------- + +Deleted +------- +unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 278 style unusedFunction false The function 'addValueTable' is never used. +unchanged ApplicationCode\ReservoirDataModel\Completions\RigEclipseToStimPlanCellTransmissibilityCalculator.cpp 109 style unusedFunction false The function 'aggregatedMatrixTransmissibility' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationInViewCollection.cpp 231 style unusedFunction false The function 'annotationsCount' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 848 style unusedFunction false The function 'appendIntersectedCells' is never used. +unchanged ApplicationCode\Application\Tools\RiaQIconTools.cpp 26 style unusedFunction false The function 'appendPixmapUpperLeft' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigEclipseResultBinSorter.cpp 48 style unusedFunction false The function 'binRange' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 684 style unusedFunction false The function 'cellsIntersectingCompletion' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 702 style unusedFunction false The function 'createOrderedIntersectionList' is never used. +unchanged ApplicationCode\Commands\ExportCommands\RicExportLgrFeature.cpp 1129 style unusedFunction false The function 'resetNumbering' is never used. +unchanged ApplicationCode\Commands\RicCreateTemporaryLgrFeature.cpp 350 style unusedFunction false The function 'containsAnyNonMainGridCells' is never used. +unchanged ApplicationCode\Application\Tools\RiaColorTools.cpp 147 style unusedFunction false The function 'contrastRatio' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimPerforationInterval.cpp 105 style unusedFunction false The function 'enableCustomEndDate' is never used. +unchanged ApplicationCode\ProjectDataModel\Rim3dView.cpp 1099 style unusedFunction false The function 'enablePerspectiveProjectionField' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigMainGrid.cpp 166 style unusedFunction false The function 'findAllReservoirCellIndicesMatching2dPoint' is never used. +unchanged ApplicationCode\ProjectDataModel\GridCrossPlots\RimGridCrossPlotDataSet.cpp 400 style unusedFunction false The function 'groupStrings' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 354 style unusedFunction false The function 'hasResultAtVertex' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 1417 style unusedFunction false The function 'isSummationResult' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 223 style unusedFunction false The function 'resultAggregation' is never used. +unchanged ApplicationCode\ProjectDataModel\RimContourMapProjection.cpp 255 style unusedFunction false The function 'showContourLabels' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimUserDefinedPolylinesAnnotation.cpp 42 style unusedFunction false The function 'xydToXyzVector' is never used. +unchanged ApplicationCode\ProjectDataModel\Completions\RimSimWellFracture.cpp 117 style unusedFunction false The function 'wellDipAtFracturePosition' is never used. +unchanged ApplicationCode\ReservoirDataModel\RigLocalGrid.cpp 65 style unusedFunction false The function 'setPositionInParentGrid' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimPolylinesAnnotationInView.cpp 66 style unusedFunction false The function 'setSourceAnnotation' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 75 style unusedFunction false The function 'setAnchorLineColor' is never used. +unchanged ApplicationCode\ProjectDataModel\Annotations\RimAnnotationTextAppearance.cpp 59 style unusedFunction false The function 'setFontColor' is never used. +unchanged ApplicationCode\ProjectDataModel\RimScaleLegendConfig.cpp 447 style unusedFunction false The function 'setCurrentScale' is never used. +unchanged ApplicationCode\ProjectDataModel\Rim3dOverlayInfoConfig.cpp 278 style unusedFunction false The function 'setIsActive' is never used. +unchanged ApplicationCode\FileInterface\RifEclipseDataTableFormatter.cpp 137 style unusedFunction false The function 'setMaxDataRowWidth' is never used. +unchanged ApplicationCode\ProjectDataModel\RimRegularLegendConfig.cpp 737 style unusedFunction false The function 'setShowLegend' is never used. + +Backlog +------- diff --git a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp index fcbd0b4dd6..07d55f8c6f 100644 --- a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp +++ b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.cpp @@ -131,14 +131,6 @@ void RifEclipseDataTableFormatter::setUnlimitedDataRowWidth() m_maxDataRowWidth = std::numeric_limits::max(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifEclipseDataTableFormatter::setMaxDataRowWidth(int maxWidth) -{ - m_maxDataRowWidth = maxWidth; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h index 6766d69654..385dbe3636 100644 --- a/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h +++ b/ApplicationCode/FileInterface/RifEclipseDataTableFormatter.h @@ -120,7 +120,6 @@ public: QString commentPrefix() const; void setCommentPrefix(const QString& commentPrefix); void setUnlimitedDataRowWidth(); - void setMaxDataRowWidth(int maxWidth); int maxDataRowWidth() const; RifEclipseDataTableFormatter& keyword(const QString& keyword); diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index a444091781..33cc043692 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -272,14 +272,6 @@ bool Rim3dOverlayInfoConfig::isActive() const return m_active; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void Rim3dOverlayInfoConfig::setIsActive(bool active) -{ - m_active = active; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h index 6b1f9a1194..5097e378b9 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h @@ -87,7 +87,6 @@ public: bool showCaseInfo() const; bool showResultInfo() const; bool isActive() const; - void setIsActive(bool active); bool showVersionInfo() const; diff --git a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp index 48ea1a5167..75de5fa02f 100644 --- a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp @@ -731,14 +731,6 @@ bool RimRegularLegendConfig::showLegend() const return m_showLegend; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimRegularLegendConfig::setShowLegend(bool show) -{ - m_showLegend = show; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h index 9d9fe4e3aa..9dd94da5f2 100644 --- a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h @@ -123,7 +123,6 @@ public: cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); } bool showLegend() const; - void setShowLegend(bool show); const caf::TitledOverlayFrame* titledOverlayFrame() const override; caf::TitledOverlayFrame* titledOverlayFrame() override; diff --git a/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.cpp index 19ac341271..df64f27127 100644 --- a/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.cpp @@ -441,17 +441,6 @@ RimLegendConfig::RangeModeType RimScaleLegendConfig::rangeMode() const return m_rangeMode(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimScaleLegendConfig::setCurrentScale(double scale) -{ - m_currentScale = scale; - - // Update legend - updateLegend(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.h b/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.h index 95cf924421..5c031dc056 100644 --- a/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimScaleLegendConfig.h @@ -109,8 +109,6 @@ public: RangeModeType rangeMode() const; - void setCurrentScale(double scale); - private: void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; void initAfterRead() override; @@ -145,6 +143,4 @@ private: caf::PdmField m_userDefinedMaxValue; caf::PdmField m_userDefinedMinValue; caf::PdmField > m_colorRangeMode; - - double m_currentScale; // [meters/pixel] };