-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
STYLE: Improve ivar printing in PrintSelf
methods
#4763
STYLE: Improve ivar printing in PrintSelf
methods
#4763
Conversation
Realized about these when resuming work on #3908. By no means this PR is intended to be extensive in the changes: separate, incremental PRs as code is inspected can be done. |
8f498c3
to
1039e0b
Compare
/azp ITK.macOS |
PrintSelf
methodsPrintSelf
methods
e67f925
to
9d72316
Compare
Tests are passing: https://open.cdash.org/viewBuildError.php?type=1&buildid=9723501 Same applies to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI errors should be addressed in current master
.
@jhlegarreta Can you please rebase on the recent master branch? |
Improve ivar printing in `PrintSelf` methods: - Use the `itkPrintSelfObjectMacro` macro to avoid boilerplate code when printing smart pointers/objects that can be null pointers. - Rely on the enum classes ostream insertion operator overload to directly print such variables. Avoid boilerplate code. - Increase consistency when printing boolean ivars: use the `({ivar} ? "On" : "Off")` recipe in agreement with the ITK SW Guide. - Do not check whether `std::string` types ivars are empty to conditionally print their contents; rely on the ostream insertion operator overload to print the appropriate content. - Print the member variable names verbatim to conform to the ITK SW Guide. - Prefer using `std::endl` instead of `\n` to add a new line for the sake of consistency. Take advantage of the commit to print ivars that had been missed in the modified classes.
9d72316
to
ee5fbe7
Compare
Done. |
/azp run ITK.Windows |
Improve ivar printing in
PrintSelf
methods:itkPrintSelfObjectMacro
macro to avoid boilerplate code when printing smart pointers/objects that can be null pointers.({ivar} ? "On" : "Off")
recipe in agreement with the ITK SW Guide.std::string
types ivars are empty to conditionally print their contents; rely on the ostream insertion operator overload to print the appropriate content.std::endl
instead of\n
to add a new line for the sake of consistency.Take advantage of the commit to print ivars that had been missed in the modified classes.
PR Checklist