#2969 Add const to currentActiveCellInfo

This commit is contained in:
Magne Sjaastad committed 2018-05-31 08:30:04 +02:00
1 parent 76c24a5c8d
commit 54f5ab66b4
7 files changed
+9 -9

No files matched your search

@@ -298,7 +298,7 @@ void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType)
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx) void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx)
{ {
RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo(); auto activeCellInfo = m_reservoirView->currentActiveCellInfo();
switch (geometryType) switch (geometryType)
{ {
@@ -151,7 +151,7 @@ void RimCellRangeFilter::setDefaultValues()
Rim3dView* rimView = nullptr; Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfTypeAsserted(rimView); this->firstAncestorOrThisOfTypeAsserted(rimView);
RigActiveCellInfo* actCellInfo = RigReservoirGridTools::activeCellInfo(rimView); auto actCellInfo = RigReservoirGridTools::activeCellInfo(rimView);
RimCase* rimCase = nullptr; RimCase* rimCase = nullptr;
this->firstAncestorOrThisOfTypeAsserted(rimCase); this->firstAncestorOrThisOfTypeAsserted(rimCase);
@@ -252,7 +252,7 @@ void RimCellRangeFilter::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
Rim3dView* rimView = nullptr; Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfTypeAsserted(rimView); this->firstAncestorOrThisOfTypeAsserted(rimView);
RigActiveCellInfo* actCellInfo = RigReservoirGridTools::activeCellInfo(rimView); auto actCellInfo = RigReservoirGridTools::activeCellInfo(rimView);
if (grid == mainGrid && actCellInfo) if (grid == mainGrid && actCellInfo)
{ {
@@ -954,7 +954,7 @@ RigCaseCellResultsData* RimEclipseView::currentGridCellResults()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RimEclipseView::currentActiveCellInfo() const RigActiveCellInfo* RimEclipseView::currentActiveCellInfo() const
{ {
if (m_eclipseCase && if (m_eclipseCase &&
m_eclipseCase->eclipseCaseData() m_eclipseCase->eclipseCaseData()
@@ -1270,7 +1270,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC
} }
visibleCells->setAll(false); visibleCells->setAll(false);
RigActiveCellInfo* activeCellInfo = this->currentActiveCellInfo(); const RigActiveCellInfo* activeCellInfo = this->currentActiveCellInfo();
CVF_ASSERT(activeCellInfo); CVF_ASSERT(activeCellInfo);
@@ -99,7 +99,7 @@ public:
void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc); void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc);
RigCaseCellResultsData* currentGridCellResults(); RigCaseCellResultsData* currentGridCellResults();
RigActiveCellInfo* currentActiveCellInfo(); const RigActiveCellInfo* currentActiveCellInfo() const;
RimEclipseCellColors* currentFaultResultColors(); RimEclipseCellColors* currentFaultResultColors();
void setEclipseCase(RimEclipseCase* reservoir); void setEclipseCase(RimEclipseCase* reservoir);
@@ -175,7 +175,7 @@ void RimMultiSnapshotDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
else if (changedField == &sliceDirection) else if (changedField == &sliceDirection)
{ {
const cvf::StructGridInterface* mainGrid = nullptr; const cvf::StructGridInterface* mainGrid = nullptr;
RigActiveCellInfo* actCellInfo = nullptr; const RigActiveCellInfo* actCellInfo = nullptr;
if (view()) if (view())
{ {
@@ -103,7 +103,7 @@ QString RigReservoirGridTools::gridName(RimCase* rimCase, int gridIndex)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RigReservoirGridTools::activeCellInfo(Rim3dView* rimView) const RigActiveCellInfo* RigReservoirGridTools::activeCellInfo(Rim3dView* rimView)
{ {
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(rimView); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(rimView);
if (eclipseView) if (eclipseView)
@@ -43,7 +43,7 @@ public:
static const cvf::StructGridInterface* gridByIndex(RimCase* rimCase, int gridIndex); static const cvf::StructGridInterface* gridByIndex(RimCase* rimCase, int gridIndex);
static QString gridName(RimCase* rimCase, int gridIndex); static QString gridName(RimCase* rimCase, int gridIndex);
static RigActiveCellInfo* activeCellInfo(Rim3dView* rimView); static const RigActiveCellInfo* activeCellInfo(Rim3dView* rimView);
private: private:
static RigMainGrid* eclipseMainGrid(RimCase* rimCase); static RigMainGrid* eclipseMainGrid(RimCase* rimCase);