7834 cref removal (#7917)

* #7834 Well Log Statistics: prefer std::shared_ptr to cvf::ref.

* #7834 Use std::map to avoid hard-coded array length.
This commit is contained in:
Kristian Bendiksen
2021-08-30 10:19:45 +02:00
committed by GitHub
parent 414ee77aa8
commit 6547ef1525
5 changed files with 16 additions and 17 deletions

View File

@@ -745,7 +745,7 @@ void RimEnsembleWellLogCurveSet::updateEnsembleCurves( const std::vector<RimWell
if ( m_statistics->hideEnsembleCurves() ) return;
cvf::ref<RigWellLogIndexDepthOffset> offsets;
std::shared_ptr<RigWellLogIndexDepthOffset> offsets;
if ( m_depthEqualization() == RimEnsembleWellLogStatistics::DepthEqualization::K_LAYER )
{
offsets = RimEnsembleWellLogStatistics::calculateIndexDepthOffset( sumCases );
@@ -788,7 +788,7 @@ void RimEnsembleWellLogCurveSet::updateEnsembleCurves( const std::vector<RimWell
curve->setWellLogChannelName( wellLogChannelName );
curve->setWellLogFile( wellLogFile );
if ( !offsets.isNull() ) curve->setIndexDepthOffsets( offsets );
if ( offsets ) curve->setIndexDepthOffsets( offsets );
curve->loadDataAndUpdate( true );
curve->updateCurveVisibility();