Adjusted code examples according to "The auto Keyword" section, did a minor fix in the section#163
Conversation
Just a nitpick... in C++ (even before using `auto`), the following is
an initialization, not an assignment:
ImageType::Pointer image = ImageType::New();
In accordance with the ITK Coding Style, section The auto Keyword: > The `auto` keyword should be used to specify a type in the following cases: > - The type is duplicated on the left side of an initialization when > it is mandated on the right side, e.g. when there is an explicit > cast or initializing with `new` or ITK's `::New()`. ... Suggested by Jon Haitz Legarreta Gorroño as part of the review of pull request InsightSoftwareConsortium/ITK#2826 "STYLE: Use `auto` for declaration of variables initialized by `New()`"
7e22e17 to
49c2bf0
Compare
|
Thanks for doing this @N-Dekker 💯. Having a clear set of guidelines and examples is essential ! Have not gone through all LaTeX sources. Wondering whether this set of changes is exhaustive. |
|
@jhlegarreta You're welcome! Do you think it would be worth to also apply this adjustment (using |
Although these seem to be only used to generate the cover illustration, being consistent is a good value I think. I assume doing this is a simultaneous replacement done automatically in your editor, so 👍 for doing it.
Keeping the ITK SW Guide up-to-date takes time, but it is worthwhile. Sharing the effort makes it easier and more enjoyable. Thanks. |
Thanks Jon. Personally I would first like to see this pull request being merged, while it is still a small and obvious improvement, that can be reviewed easily. Then later, we can always further extend the |
No description provided.