mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle Return objects instead of passing in structures as parameters * Add nodiscard to several functions * Remove redundant this-> * Rename to ptrReferencedObjectsByType
This commit is contained in:
@@ -165,8 +165,7 @@ void RimWellFlowRateCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
if ( updateParentPlot )
|
||||
{
|
||||
RimWellLogTrack* track = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( track );
|
||||
auto track = firstAncestorOrThisOfTypeAsserted<RimWellLogTrack>();
|
||||
track->updateStackedCurveData();
|
||||
|
||||
updateZoomInParentPlot();
|
||||
@@ -184,8 +183,7 @@ void RimWellFlowRateCurve::updateCurveAppearance()
|
||||
|
||||
bool isLastCurveInGroup = false;
|
||||
{
|
||||
RimWellLogTrack* wellLogTrack;
|
||||
firstAncestorOrThisOfTypeAsserted( wellLogTrack );
|
||||
auto wellLogTrack = firstAncestorOrThisOfTypeAsserted<RimWellLogTrack>();
|
||||
std::map<int, std::vector<RimWellLogCurve*>> stackedCurveGroups = wellLogTrack->visibleStackedCurves();
|
||||
const std::vector<RimWellLogCurve*>& curveGroup = stackedCurveGroups[this->m_groupId];
|
||||
|
||||
@@ -269,8 +267,7 @@ void RimWellFlowRateCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellFlowRateCurve::isUsingConnectionNumberDepthType() const
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAncestorOrThisOfType( wellLogPlot );
|
||||
auto wellLogPlot = firstAncestorOrThisOfType<RimWellLogPlot>();
|
||||
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
|
||||
{
|
||||
return true;
|
||||
@@ -284,10 +281,7 @@ bool RimWellFlowRateCurve::isUsingConnectionNumberDepthType() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellAllocationPlot* RimWellFlowRateCurve::wellAllocationPlot() const
|
||||
{
|
||||
RimWellAllocationPlot* wap = nullptr;
|
||||
this->firstAncestorOrThisOfType( wap );
|
||||
|
||||
return wap;
|
||||
return firstAncestorOrThisOfType<RimWellAllocationPlot>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user