Skip to content

Commit

Permalink
Merge pull request #6098 from johnhaddon/cyclesPtrTweaks
Browse files Browse the repository at this point in the history
IECoreCycles : Use `intrusive_ptr` where appropriate
  • Loading branch information
murraystevenson authored Oct 17, 2024
2 parents 421eff8 + 2b95632 commit 19bf576
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/GafferCycles/IECoreCyclesPreview/IECoreCycles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ IECore::CompoundDataPtr g_passData;
// Get sockets data
IECore::CompoundDataPtr getSockets( const ccl::NodeType *nodeType, const bool output )
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &sockets = result->writable();

if( !output )
Expand Down Expand Up @@ -134,9 +134,9 @@ IECore::CompoundDataPtr getSockets( const ccl::NodeType *nodeType, const bool ou
return IECore::CompoundDataPtr( result );
}

IECore::CompoundData *deviceData()
IECore::CompoundDataPtr deviceData()
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &devices = result->writable();

for( const ccl::DeviceInfo &device : ccl::Device::available_devices() )
Expand All @@ -162,9 +162,9 @@ IECore::CompoundData *deviceData()
return result;
}

IECore::CompoundData *nodeData()
IECore::CompoundDataPtr nodeData()
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &nodes = result->writable();

for( const auto& nodeType : ccl::NodeType::types() )
Expand All @@ -190,9 +190,9 @@ IECore::CompoundData *nodeData()
return result;
}

IECore::CompoundData *shaderData()
IECore::CompoundDataPtr shaderData()
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &shaders = result->writable();

for( const auto& nodeType : ccl::NodeType::types() )
Expand Down Expand Up @@ -351,9 +351,9 @@ IECore::CompoundData *shaderData()
return result;
}

IECore::CompoundData *lightData()
IECore::CompoundDataPtr lightData()
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &lights = result->writable();

const ccl::NodeType *cNodeType = ccl::NodeType::find( ccl::ustring( "light" ) );
Expand Down Expand Up @@ -447,9 +447,9 @@ IECore::CompoundData *lightData()
return result;
}

IECore::CompoundData *passData()
IECore::CompoundDataPtr passData()
{
IECore::CompoundData *result = new IECore::CompoundData();
IECore::CompoundDataPtr result = new IECore::CompoundData();
IECore::CompoundDataMap &passes = result->writable();

const ccl::NodeEnum *enums = ccl::Pass::get_type_enum();
Expand All @@ -474,7 +474,7 @@ IECore::CompoundData *passData()
return result;
}

}
} // namespace

namespace IECoreCycles
{
Expand Down

0 comments on commit 19bf576

Please sign in to comment.