Fix warnings

This commit is contained in:
Magne Sjaastad 2018-09-27 20:17:56 +02:00
parent 436bb73485
commit 4877e058ed
6 changed files with 21 additions and 21 deletions

View File

@ -253,26 +253,26 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimGridView
bool rangeFilterInitState = rimView->rangeFilterCollection()->isActive();
rimView->rangeFilterCollection()->isActive = true;
for (int i = msd->startSliceIndex(); i <= msd->endSliceIndex(); i++)
for (int sliceIndex = msd->startSliceIndex(); sliceIndex <= msd->endSliceIndex(); sliceIndex++)
{
QString rangeFilterString = msd->sliceDirection().text() + "-" + QString::number(i);
QString rangeFilterString = msd->sliceDirection().text() + "-" + QString::number(sliceIndex);
QString fileName = viewCaseResultString + "_" + timeStepString + "_" + rangeFilterString;
rangeFilter->setDefaultValues();
if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_I)
{
rangeFilter->cellCountI = 1;
rangeFilter->startIndexI = i;
rangeFilter->startIndexI = sliceIndex;
}
else if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_J)
{
rangeFilter->cellCountJ = 1;
rangeFilter->startIndexJ = i;
rangeFilter->startIndexJ = sliceIndex;
}
else if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_K)
{
rangeFilter->cellCountK = 1;
rangeFilter->startIndexK = i;
rangeFilter->startIndexK = sliceIndex;
}
rimView->rangeFilterCollection()->updateDisplayModeNotifyManagedViews(rangeFilter);

View File

@ -72,10 +72,10 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
RimSimWellFracture* fracture = new RimSimWellFracture();
if (fractureCollection->simwellFractures.empty())
{
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
if (activeView)
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
if (eclipseView)
{
activeView->fractureColors()->setDefaultResultName();
eclipseView->fractureColors()->setDefaultResultName();
}
}

View File

@ -101,7 +101,7 @@ void RicNewPltPlotFeature::onActionTriggered(bool isChecked)
}
else if ((eclipseWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>()) != nullptr)
{
RimWellPath* wellPath = proj->wellPathFromSimWellName(eclipseWell->name());
wellPath = proj->wellPathFromSimWellName(eclipseWell->name());
if (!wellPath ) return;
wellPathName = wellPath->name();

View File

@ -88,16 +88,16 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
if (wellPath || simWell)
{
RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RimWellLogTrack* newWellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RimWellLogExtractionCurve* plotCurve =
RicWellLogTools::addExtractionCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath,
RicWellLogTools::addExtractionCurve(newWellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath,
simWell, branchIndex, useBranchDetection);
plotCurve->loadDataAndUpdate(true);
RimWellLogPlot* plot = nullptr;
wellLogPlotTrack->firstAncestorOrThisOfType(plot);
newWellLogPlotTrack->firstAncestorOrThisOfType(plot);
if (plot && plotCurve->curveData())
{
plot->setDepthUnit(plotCurve->curveData()->depthUnit());

View File

@ -530,17 +530,17 @@ void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part)
vertices->add(faultVertexToAttachLabel);
vertices->add(labelPosition);
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
geo->setVertexArray(vertices.p());
cvf::ref<cvf::DrawableGeo> lineGeo = new cvf::DrawableGeo;
lineGeo->setVertexArray(vertices.p());
cvf::ref<cvf::PrimitiveSetDirect> primSet = new cvf::PrimitiveSetDirect(cvf::PT_LINES);
primSet->setStartIndex(0);
primSet->setIndexCount(vertices->size());
geo->addPrimitiveSet(primSet.p());
lineGeo->addPrimitiveSet(primSet.p());
m_faultLabelLinePart = new cvf::Part;
m_faultLabelLinePart->setName("Anchor line for label" + cvf::String(static_cast<int>(m_grid->gridIndex())));
m_faultLabelLinePart->setDrawable(geo.p());
m_faultLabelLinePart->setDrawable(lineGeo.p());
m_faultLabelLinePart->updateBoundingBox();

View File

@ -132,8 +132,8 @@ void RimViewLinker::updateCellResult()
{
if (viewLink->managedView())
{
Rim3dView* rimView = viewLink->managedView();
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(rimView);
Rim3dView* managedView = viewLink->managedView();
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(managedView);
if (eclipseView)
{
if (viewLink->isResultColorControlled())
@ -170,8 +170,8 @@ void RimViewLinker::updateCellResult()
{
if (viewLink->managedView())
{
Rim3dView* rimView = viewLink->managedView();
RimGeoMechView* geoView = dynamic_cast<RimGeoMechView*>(rimView);
Rim3dView* managedView = viewLink->managedView();
RimGeoMechView* geoView = dynamic_cast<RimGeoMechView*>(managedView);
if (geoView)
{
if (viewLink->isResultColorControlled())
@ -370,7 +370,7 @@ void RimViewLinker::updateScaleZ(RimGridView* sourceView, double scaleZ)
allViewsForCameraSync(sourceView, views);
// Make sure scale factors are identical
for (auto & view : views)
for (auto& view : views)
{
view->setScaleZAndUpdate(scaleZ);
}