Skip to content

STYLE: Let TransformPointToContinuousGridIndex return the index by value#605

Merged
N-Dekker merged 1 commit into
developfrom
TransformPointToContinuousGridIndex-return-by-value
Feb 5, 2022
Merged

STYLE: Let TransformPointToContinuousGridIndex return the index by value#605
N-Dekker merged 1 commit into
developfrom
TransformPointToContinuousGridIndex-return-by-value

Conversation

@N-Dekker
Copy link
Copy Markdown
Member

@N-Dekker N-Dekker commented Feb 4, 2022

Return-by-value is easier to read than pass-by-non-const-reference, and ContinuousIndexType has lightweight copy semantics, so it appears preferable for AdvancedBSplineDeformableTransformBase::TransformPointToContinuousGridIndex to simply return the continuous index.

Declared local continuous index variables const.

Analogous to ITK pull request InsightSoftwareConsortium/ITK#868 commit InsightSoftwareConsortium/ITK@65233e3 "ENH: Convenience overloads for ImageBase Transform member functions"

Return-by-value is easier to read than pass-by-non-const-reference, and `ContinuousIndexType` has lightweight copy semantics, so it appears preferable for `AdvancedBSplineDeformableTransformBase::TransformPointToContinuousGridIndex` to simply return the continuous index.

Declared local continuous index variables `const`.

Analogous to ITK pull request InsightSoftwareConsortium/ITK#868 commit InsightSoftwareConsortium/ITK@65233e3 "ENH: Convenience overloads for ImageBase Transform member functions"
@N-Dekker N-Dekker merged commit c7fb15d into develop Feb 5, 2022
@N-Dekker N-Dekker deleted the TransformPointToContinuousGridIndex-return-by-value branch February 5, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant