Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IECoreCycles : Use intrusive_ptr where appropriate #6098

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading