Skip to content

Commit

Permalink
ValuePlug : Remove deprecated getObjectValue() method
Browse files Browse the repository at this point in the history
This was superceded by the overload with the `owner` argument in Gaffer 1.3, and was only kept for backwards compatibility. Likewise, remove the equivalent  `getValueInternal()` method, which we needed to keep in 1.3 despite it being private, because it was called by inline public methods.
  • Loading branch information
johnhaddon committed Nov 2, 2023
1 parent 3c0131f commit fc1207a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Breaking Changes
----------------

- ValuePlug : Removed deprecated `getObjectValue()` overload.
- Dispatcher : Removed `createMatching()` method.
- Process : Removed non-const variant of the `handleException()` method.
- StringPlug : Removed deprecated `precomputedHash` argument from `getValue()` method.
Expand Down
5 changes: 0 additions & 5 deletions include/Gaffer/ValuePlug.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ class GAFFER_API ValuePlug : public Plug
/// so this feature is not suitable for use in classes that override that method.
template<typename T = IECore::Object>
const T *getObjectValue( IECore::ConstObjectPtr &owner, const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// \deprecated
template<typename T = IECore::Object>
boost::intrusive_ptr<const T> getObjectValue( const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// Should be called by derived classes when they wish to set the plug
/// value - the value is referenced directly (not copied) and so must
/// not be changed following the call.
Expand All @@ -271,8 +268,6 @@ class GAFFER_API ValuePlug : public Plug
class SetValueAction;

const IECore::Object *getValueInternal( IECore::ConstObjectPtr &owner, const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// \deprecated
IECore::ConstObjectPtr getValueInternal( const IECore::MurmurHash *precomputedHash = nullptr ) const;
void setValueInternal( IECore::ConstObjectPtr value, bool propagateDirtiness );
void childAddedOrRemoved();
// Emits the appropriate Node::plugSetSignal() for this plug and all its
Expand Down
17 changes: 0 additions & 17 deletions include/Gaffer/ValuePlug.inl
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,4 @@ const T *ValuePlug::getObjectValue( IECore::ConstObjectPtr &owner, const IECore:
) );
}

template<typename T>
boost::intrusive_ptr<const T> ValuePlug::getObjectValue( const IECore::MurmurHash *precomputedHash ) const
{
IECore::ConstObjectPtr owner;
const T *value = getObjectValue<T>( owner, precomputedHash );
if( owner )
{
// Avoid unnecessary reference count manipulations.
return boost::static_pointer_cast<const T>( std::move( owner ) );
}
else
{
return value;
}

}

} // namespace Gaffer
10 changes: 2 additions & 8 deletions src/Gaffer/ValuePlug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,8 @@ void ValuePlug::resetDefault()
{
if( m_defaultValue != nullptr )
{
IECore::ConstObjectPtr newDefault = getObjectValue();
IECore::ConstObjectPtr newDefaultOwner;
IECore::ConstObjectPtr newDefault = getObjectValue( newDefaultOwner );
IECore::ConstObjectPtr oldDefault = m_defaultValue;
Action::enact(
this,
Expand Down Expand Up @@ -1040,13 +1041,6 @@ const IECore::Object *ValuePlug::getValueInternal( IECore::ConstObjectPtr &owner
return ComputeProcess::value( this, owner, precomputedHash );
}

IECore::ConstObjectPtr ValuePlug::getValueInternal( const IECore::MurmurHash *precomputedHash ) const
{
IECore::ConstObjectPtr owner;
const IECore::Object *result = getValueInternal( owner, precomputedHash );
return owner ? owner : result;
}

void ValuePlug::setObjectValue( IECore::ConstObjectPtr value )
{
bool haveInput = getInput();
Expand Down

0 comments on commit fc1207a

Please sign in to comment.