Skip to content

Conversation

@N-Dekker
Copy link
Contributor

Following C++ Core Guidelines, "Use unique_ptr or shared_ptr to avoid forgetting to delete objects created using new".

Defaulted the destructor of GradientImageFilter.

@github-actions github-actions bot added area:Filtering Issues affecting the Filtering module type:Style Style changes: no logic impact (indentation, comments, naming) labels Mar 12, 2024
@N-Dekker N-Dekker marked this pull request as ready for review March 12, 2024 23:36
@N-Dekker N-Dekker force-pushed the unique_ptr-GradientImageFilter-m_BoundaryCondition branch from efa706c to 718b6bd Compare March 13, 2024 01:47
Following C++ Core Guidelines, February 15, 2024, "Use `unique_ptr` or
`shared_ptr` to avoid forgetting to `delete` objects created using `new`",
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-smart

Defaulted the destructor of `GradientImageFilter`.
@N-Dekker N-Dekker force-pushed the unique_ptr-GradientImageFilter-m_BoundaryCondition branch from 718b6bd to 2f4f838 Compare March 13, 2024 09:07
@blowekamp blowekamp self-requested a review March 15, 2024 16:43
@hjmjohnson hjmjohnson merged commit db095cd into InsightSoftwareConsortium:master Mar 17, 2024
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Mar 25, 2024
Added `GradientImageFilter::OverrideBoundaryCondition` overload, to allows
specifying the argument by a `unique_ptr`. Aims to make it more clear that the
filter takes the ownership of the specified `BoundaryCondition` object.

Triggered by a comment from Bradley Lowekamp at
InsightSoftwareConsortium#4512 (comment)
on March 13, 2024.
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Mar 25, 2024
Added `GradientImageFilter::OverrideBoundaryCondition` overload, to allows
specifying the argument by a `unique_ptr`. Aims to make it more clear that the
filter takes the ownership of the specified `BoundaryCondition` object.

Triggered by a comment from Bradley Lowekamp at
InsightSoftwareConsortium#4512 (comment)
on March 13, 2024.
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Apr 1, 2024
Added `GradientImageFilter::OverrideBoundaryCondition` overload, to allows
specifying the argument by a `unique_ptr`. Aims to make it more clear that the
filter takes the ownership of the specified `BoundaryCondition` object.

Triggered by a comment from Bradley Lowekamp at
InsightSoftwareConsortium#4512 (comment)
on March 13, 2024.
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Apr 2, 2024
Added `GradientImageFilter::OverrideBoundaryCondition` overload, to allows
specifying the argument by a `unique_ptr`. Aims to make it more clear that the
filter takes the ownership of the specified `BoundaryCondition` object.

Triggered by a comment from Bradley Lowekamp at
InsightSoftwareConsortium#4512 (comment)
on March 13, 2024.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants