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:
@@ -152,7 +152,7 @@ void RimCustomObjectiveFunctionWeight::fieldChangedByUi( const caf::PdmFieldHand
|
||||
RimSummaryCaseCollection* candidateEnsemble = parentCurveSet()->summaryCaseCollection();
|
||||
|
||||
std::vector<RifEclipseSummaryAddress> candidateAddresses;
|
||||
for ( auto address : m_objectiveValuesSummaryAddresses().children() )
|
||||
for ( auto address : m_objectiveValuesSummaryAddresses().childrenByType() )
|
||||
{
|
||||
candidateAddresses.push_back( address->address() );
|
||||
}
|
||||
@@ -240,9 +240,7 @@ caf::PdmFieldHandle* RimCustomObjectiveFunctionWeight::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEnsembleCurveSet* RimCustomObjectiveFunctionWeight::parentCurveSet() const
|
||||
{
|
||||
RimEnsembleCurveSet* curveSet;
|
||||
firstAncestorOrThisOfType( curveSet );
|
||||
return curveSet;
|
||||
return firstAncestorOrThisOfType<RimEnsembleCurveSet>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -250,9 +248,7 @@ RimEnsembleCurveSet* RimCustomObjectiveFunctionWeight::parentCurveSet() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCustomObjectiveFunction* RimCustomObjectiveFunctionWeight::parentObjectiveFunction() const
|
||||
{
|
||||
RimCustomObjectiveFunction* func;
|
||||
firstAncestorOrThisOfType( func );
|
||||
return func;
|
||||
return firstAncestorOrThisOfType<RimCustomObjectiveFunction>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user