#3340 Remove unused variables

This commit is contained in:
Magne Sjaastad
2018-09-10 10:27:47 +02:00
parent b81114c7d4
commit bbebbf108f
32 changed files with 5 additions and 57 deletions

View File

@@ -40,7 +40,6 @@ std::vector<RicfCommandObject*> RicfCommandFileReader::readCommands(QTextStream&
errorMessageContainer->skipWhiteSpaceWithLineNumberCount(inputStream);
// Read command name
QString commandName;
bool foundStartBracet = false;
{
errorMessageContainer->skipWhiteSpaceWithLineNumberCount(inputStream);
while ( !inputStream.atEnd() )

View File

@@ -1876,9 +1876,7 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFractureIntersections(con
bool* foundSubGridIntersections)
{
CVF_ASSERT(foundSubGridIntersections != nullptr);
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
double fractureMD = fracture->fractureMD();
RicMswCompletion fractureCompletion(RigCompletionData::FRACTURE, fracture->name());
double position = fracture->fractureMD();
double width = fracture->fractureTemplate()->computeFractureWidth(fracture);

View File

@@ -661,9 +661,6 @@ QString RicWellPathFractureTextReportFeatureImpl::createConnectionsPerWellText(c
{
QString tableText;
RiaEclipseUnitTools::UnitSystem unitSystem = wellPathFractureReportItems.front().unitSystem();
bool isFieldUnits = unitSystem == RiaEclipseUnitTools::UNITS_FIELD;
QTextStream stream(&tableText);
RifEclipseDataTableFormatter formatter(stream);
configureFormatter(&formatter);

View File

@@ -54,7 +54,6 @@ bool RicImportSummaryCaseFeature::isCommandEnabled()
void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
RiaPreferences* prefs = app->preferences();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QStringList fileNames_ = QFileDialog::getOpenFileNames(nullptr, "Import Summary Case", defaultDir, "Eclipse Summary File (*.SMSPEC);;All Files (*.*)");

View File

@@ -609,7 +609,6 @@ void RicSummaryCaseRestartDialog::slotShowFullPathToggled(int state)
//--------------------------------------------------------------------------------------------------
void RicSummaryCaseRestartDialog::slotDialogButtonClicked(QAbstractButton* button)
{
bool okButtonClicked = m_buttons->button(QDialogButtonBox::Ok) == button;
bool cancelButtonClicked = m_buttons->button(QDialogButtonBox::Cancel) == button;
bool okToAllButtonClicked = m_buttons->button(QDialogButtonBox::Apply) == button;

View File

@@ -51,7 +51,7 @@ void RicNewEnsembleCurveFilterFeature::onActionTriggered(bool isChecked)
if (filterColls.size() == 1)
{
auto newFilter = filterColls[0]->addFilter();
filterColls[0]->addFilter();
filterColls[0]->updateConnectedEditors();
RiuPlotMainWindowTools::selectAsCurrentItem(filterColls.front());
}

View File

@@ -422,7 +422,6 @@ void RicSummaryCurveCreator::updatePreviewCurvesFromCurveDefinitions(
{
static bool warningDisplayed = false;
RimSummaryCase* prevCase = nullptr;
std::set<RiaSummaryCurveDefinition> summaryCurveDefsToDisplay;
// Ignore curve sets when assigning colors to singe summary curves

View File

@@ -43,8 +43,6 @@ bool Ric3dWellLogCurvePickEventHandler::handlePickEvent(const Ric3DPickEvent& ev
{
if (eventObject.m_pickItemInfos.empty()) return false;
cvf::uint triangleIndex = cvf::UNDEFINED_UINT;
const auto& firstPickedItem = eventObject.m_pickItemInfos.front();
const cvf::Part* firstPickedPart = firstPickedItem.pickedPart();

View File

@@ -107,7 +107,6 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dst
if (srcPlot)
{
srcPlot->removeTrack(track);
RiuPlotMainWindow* plotWindow = RiaApplication::instance()->getOrCreateMainPlotWindow();
srcPlots.insert(srcPlot);
}

View File

@@ -94,8 +94,6 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex)
RimEclipseCellColors* cellResultColors = eclipseView->cellResult();
CVF_ASSERT(cellResultColors);
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
// CrossSections
if (m_intersectionBoxFaces.notNull())
{

View File

@@ -166,8 +166,6 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex,
CVF_ASSERT(cellResultColors);
CVF_ASSERT(ternaryColorMapper);
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
// CrossSections
if (m_crossSectionFaces.notNull())
{

View File

@@ -106,7 +106,6 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell
updateNNCColors(timeStepIndex, cellResultColors);
RimEclipseView* eclipseView = cellResultColors->reservoirView();
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
// Faults
if (m_nativeFaultFaces.notNull())

View File

@@ -91,8 +91,6 @@ double computeAverageZForTwoDeepestZ(const RigMainGrid* mainGrid
size_t globalReservoirCellIndex,
cvf::StructGridInterface::FaceType face)
{
const RigCell& currentCell = mainGrid->globalCellArray()[globalReservoirCellIndex];
cvf::Vec3d hexCorners[8];
mainGrid->cellCornerVertices(globalReservoirCellIndex, hexCorners);

View File

@@ -566,7 +566,6 @@ RiaRftPltCurveDefinition RimWellPlotTools::curveDefFromCurve(const RimWellLogCur
}
else if (wellLogFileCurve != nullptr)
{
const RimWellPath* const wellPath = wellLogFileCurve->wellPath();
RimWellLogFile* const wellLogFile = wellLogFileCurve->wellLogFile();
if (wellLogFile != nullptr)

View File

@@ -502,9 +502,6 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
int curveGroupId = 0;
RimProject* proj = RiaApplication::instance()->project();
RimWellPath* wellPath = RimWellPlotTools::wellPathByWellPathNameOrSimWellName(m_wellPathName);
QString dateFormatString;
{
std::vector<QDateTime> allTimeSteps;
@@ -626,7 +623,6 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
}
else if ( sourceDef.sourceType() == RifDataSourceForRftPlt::OBSERVED )
{
RimWellLogFile* const wellLogFile = sourceDef.wellLogFile();
if ( sourceDef.wellLogFile() && sourceDef.wellLogFile()->wellLogFileData() )
{
RimWellLogFile::WellFlowCondition flowCondition = sourceDef.wellLogFile()->wellFlowRateCondition();

View File

@@ -219,7 +219,6 @@ void RimSimWellInView::wellHeadTopBottomPosition(int frameIndex, cvf::Vec3d* top
whCellPtr = &(rigReservoir->cellFromWellResultCell(wellResultFramePtr->wellHeadOrStartCell()));
}
const RigWellResultFrame& wellResultFrame = *wellResultFramePtr;
const RigCell& whCell = *whCellPtr;
// Match this position with pipe start position in RivWellPipesPartMgr::calculateWellPipeCenterline()

View File

@@ -260,7 +260,6 @@ bool RimSummaryCalculation::calculate()
return false;
}
RimSummaryAddress* sumAdr = v->summaryAddress();
RiaSummaryCurveDefinition curveDef(v->summaryCase(), v->summaryAddress()->address());
std::vector<double> curveValues;

View File

@@ -303,8 +303,6 @@ void RimWellLogFile::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
uiOrdering.add(&m_date);
m_date.uiCapability()->setUiReadOnly(m_lasFileHasValidDate);
auto timespec = m_date().timeSpec();
if (!isDateValid(m_date()))
{
uiOrdering.add(&m_invalidDateMessage);

View File

@@ -629,8 +629,6 @@ QString RimWellLogPlot::createAutoName() const
}
RimCase* commonCase = m_commonDataSource->caseToApply();
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(commonCase);
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(commonCase);
RimWellPath* commonWellPath = m_commonDataSource->wellPathToApply();
QStringList generatedAutoTags;

View File

@@ -243,7 +243,6 @@ void RimDerivedEnsembleCaseCollection::fieldChangedByUi(const caf::PdmFieldHandl
{
bool doUpdate = false;
bool doUpdateCases = false;
bool doClearAllData = false;
bool doShowDialog = false;
if (changedField == &m_ensemble1 || changedField == &m_ensemble2)

View File

@@ -992,7 +992,6 @@ void RimSummaryCurve::calculateCurveInterpolationFromAddress()
{
if (m_yValuesCurveVariable())
{
auto category = m_yValuesCurveVariable()->address().category();
auto address = m_yValuesCurveVariable()->address();
if (address.hasAccumulatedData())
{

View File

@@ -153,7 +153,6 @@ void RimSummaryCurveAppearanceCalculator::updateApperanceIndices()
{
{
std::map<std::string, size_t> caseAppearanceIndices = mapNameToAppearanceIndex(m_caseAppearanceType, m_allSummaryCaseNames);
int idx = 0;
for (auto& pair : m_caseToAppearanceIdxMap)
{
pair.second = static_cast<int>(caseAppearanceIndices[pair.first->summaryHeaderFilename().toUtf8().constData()]);
@@ -161,7 +160,6 @@ void RimSummaryCurveAppearanceCalculator::updateApperanceIndices()
}
{
std::map<std::string, size_t> wellAppearanceIndices = mapNameToAppearanceIndex(m_wellAppearanceType, m_allSummaryWellNames);
int idx = 0;
for (auto& pair : m_welToAppearanceIdxMap)
{
pair.second = static_cast<int>(wellAppearanceIndices[pair.first]);

View File

@@ -357,8 +357,6 @@ void RimSummaryFilter::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering
{
uiOrdering.add(&m_filterType);
caf::PdmUiGroup* curveVarFilterGroup = nullptr;
if(m_filterType() == SUM_FILTER_VAR_STRING)
{
uiOrdering.add(&m_completeVarStringFilter);

View File

@@ -93,7 +93,6 @@ void RigGeoMechWellLogExtractor::curveData(const RigFemResultAddress& resAddr, i
CVF_ASSERT(resAddr.resultPosType != RIG_WELLPATH_DERIVED);
const RigFemPart* femPart = m_caseData->femParts()->part(0);
const std::vector<float>& resultValues = m_caseData->femPartResults()->resultValues(convResAddr, 0, frameIndex);
if (!resultValues.size()) return;
@@ -210,8 +209,6 @@ void RigGeoMechWellLogExtractor::wellPathAngles(const RigFemResultAddress& resAd
const cvf::Vec3d up(0.0, 0.0, 1.0);
for (int64_t intersectionIdx = 0; intersectionIdx < (int64_t)m_intersections.size(); ++intersectionIdx)
{
size_t elmIdx = m_intersectedCellsGlobIdx[intersectionIdx];
cvf::Vec3d wellPathTangent = calculateWellPathTangent(intersectionIdx, TangentFollowWellPathSegments);
// Deviation from vertical. Since well path is tending downwards we compare with negative z.
@@ -258,8 +255,6 @@ void RigGeoMechWellLogExtractor::wellPathScaledCurveData(const RigFemResultAddre
CVF_ASSERT(values);
const RigFemPart* femPart = m_caseData->femParts()->part(0);
const RigFemPartGrid* femPartGrid = femPart->getOrCreateStructGrid();
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
std::string nativeFieldName;
@@ -349,7 +344,6 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData(const RigFemResultAddress
RigFemResultAddress ucsResAddr(RIG_ELEMENT, "UCS", "");
const RigFemPart* femPart = m_caseData->femParts()->part(0);
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
// Load results
@@ -770,8 +764,6 @@ cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid(size_t intersectionIdx) cons
//--------------------------------------------------------------------------------------------------
double RigGeoMechWellLogExtractor::getWellLogSegmentValue(size_t intersectionIdx, const std::vector<std::pair<double, double>>& wellLogValues) const
{
const RigFemPart* femPart = m_caseData->femParts()->part(0);
double startMD, endMD;
if (intersectionIdx % 2 == 0)
{

View File

@@ -148,8 +148,10 @@ TEST(RiaProjectFileVersionTools, OrderKnownVersionStrings)
qSort(sortedVersionList.begin(), sortedVersionList.end(), RiaProjectFileVersionTools::isCandidateVersionNewerThanOther);
}
/*
for (const auto& s : sortedVersionList)
{
// std::cout << s.toStdString() << "\n";
std::cout << s.toStdString() << "\n";
}
*/
}

View File

@@ -688,7 +688,6 @@ TEST(RiaTimeHistoryCurveResampler, Test_PeriodEndValues_SamplesStartBeforePeriod
time_t t0 = toTime_t("2018-01-30");
time_t t1 = toTime_t("2018-02-10");
time_t t2 = toTime_t("2018-03-05");
time_t t3 = toTime_t("2018-03-02");
time_t tp0 = toTime_t("2018-02-01");
time_t tp1 = toTime_t("2018-03-01");
time_t tp2 = toTime_t("2018-04-01");

View File

@@ -72,7 +72,7 @@ QCursor RiuCursors::cursorFromFile(const QString& fileName, int hotspotX, int
return QCursor();
}
QRgb maskClr = image.pixel(0, 0);
//QRgb maskClr = image.pixel(0, 0);
//QImage imgMask = image.createMaskFromColor(maskClr, Qt::MaskInColor);
QImage imgMask = image.createHeuristicMask(true);

View File

@@ -36,7 +36,6 @@ RiuPickItemInfo RiuPickItemInfo::extractPickItemInfo(const cvf::HitItem* hitItem
pickInfo.m_globalPickedPoint = hitItem->intersectionPoint();
if ( pickInfo.m_pickedPart ) pickInfo.m_sourceInfo = pickInfo.m_pickedPart->sourceInfo();
cvf::uint faceIdx = -1;
const cvf::HitDetailDrawableGeo* detail = dynamic_cast<const cvf::HitDetailDrawableGeo*>(hitItem->detail());
if ( detail ) pickInfo.m_faceIdx = detail->faceIndex();

View File

@@ -83,8 +83,6 @@ void RiuPlotAnnotationTool::attachWellPicks(QwtPlot* plot, const std::vector<QSt
if (names.size() != yPositions.size()) return;
m_plot = plot;
double delta = 0.5;
for (size_t i = 0; i < names.size(); i++)
{
QwtPlotMarker* line(new QwtPlotMarker());

View File

@@ -436,7 +436,6 @@ void RiuPlotMainWindow::setWidthOfMdiWindow(QWidget* mdiWindowWidget, int newWid
if (mdiWindow)
{
QSize subWindowSize = mdiWindow->size();
int currentWidth = subWindowSize.width();
subWindowSize.setWidth(std::max(newWidth, 100));
mdiWindow->resize(subWindowSize);

View File

@@ -267,7 +267,6 @@ QString RiuResultTextBuilder::gridResultDetails()
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
{
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text);
@@ -744,7 +743,6 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData())
{
RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData();
RigGridBase* grid = eclipseCaseData->grid(m_gridIndex);
if (resultColors->isTernarySaturationSelected())
{

View File

@@ -690,7 +690,6 @@ QList<caf::PdmOptionItemInfo> RiuSummaryCurveDefSelection::calculateValueOptions
itemNames[OBS_DATA].clear();
}
auto pdmField = identifierAndField->pdmField();
for(int i = 0; i < itemCount; i++)
{
// Create headers only for vector fields when observed data is selected
@@ -973,8 +972,6 @@ std::set<RifEclipseSummaryAddress> RiuSummaryCurveDefSelection::findPossibleSumm
allAddresses = currEnsemble->calculateUnionOfSummaryAddresses();
}
int addressCount = static_cast<int>(allAddresses.size());
bool applySelections = identifierAndField == nullptr || (!isVectorField && controllingIdentifierAndField != nullptr);
std::vector<SummaryIdentifierAndField*> controllingFields;
if (applySelections)