Skip to content

STYLE: Prefer default constructors#3162

Merged
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
hjmjohnson:make-default-constructors
Feb 5, 2022
Merged

STYLE: Prefer default constructors#3162
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
hjmjohnson:make-default-constructors

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

PR Checklist

@github-actions github-actions Bot added area:Filtering Issues affecting the Filtering module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module type:Style Style changes: no logic impact (indentation, comments, naming) labels Feb 4, 2022
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hjmjohnson Please check: the commit text seems unrelated to the commit itself! 142a9ed ("STYLE: Remove outdated debugging statements") does not remove any itkDebugMacro, and it does not add any = default either!

Converts a default constructor’s member initializers into the new
default member initializers in C++11. Other member initializers that match the
default member initializer are removed. This can reduce repeated code or allow
use of ‘= default’.
This check replaces default bodies of special member functions with
= default;. The explicitly defaulted function declarations enable more
opportunities in optimization, because the compiler might treat
explicitly defaulted functions as trivial.

Additionally, the C++11 use of = default more clearly expreses the
intent for the special member functions.
@hjmjohnson hjmjohnson force-pushed the make-default-constructors branch from 15dc097 to 5031424 Compare February 5, 2022 15:39
@github-actions github-actions Bot removed the area:Numerics Issues affecting the Numerics module label Feb 5, 2022
@dzenanz dzenanz merged commit 3671be2 into InsightSoftwareConsortium:master Feb 5, 2022
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 area:Registration Issues affecting the Registration module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants