-
Notifications
You must be signed in to change notification settings - Fork 16
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
ENH: Add section "Initializing variables of fixed size array types" #216
ENH: Add section "Initializing variables of fixed size array types" #216
Conversation
Suggested by Jon Haitz Legarreta Gorroño at InsightSoftwareConsortium/ITK#5024 (comment)
5e5f2e5
to
f10846c
Compare
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.
@N-Dekker thank you!
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.
Sorry for my late review. Thanks for doing this @N-Dekker. A few comments inline.
\code{Index}, \code{Size}, \code{FixedArray}, \code{Point}, and \code{Vector}. | ||
|
||
A variable of such a fixed size array type can be zero-initialized by an empty | ||
initializer list, `{}`. This is usually the preferred way to initialize the |
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.
`{}` will not highlight the content in LaTeX as you would expect in Markdown: LaTex uses double backticks at the beginning/upright ticks at the end for ticks, simple backticks will render as opening simple ticks both at the beginning/end. To me, the right thing to use here is \code{}
.
\end{minted} | ||
\normalsize | ||
|
||
\code{Index} and \code{Size} both have a static `Filled(fillValue)` member |
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.
Same comment as above about bacticks.
\end{minted} | ||
\normalsize | ||
|
||
For other fixed size array types, the function `itk::MakeFilled<T>(fillValue)` |
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.
Same comment as above about backticks.
Addressed the comments by Jon Haitz Legarreta Gorroño at InsightSoftwareConsortium#216 (review)
Addressed the comments by Jon Haitz Legarreta Gorroño at InsightSoftwareConsortium#216 (review) Specifically: > `{}` will not highlight the content in LaTeX as you would expect in Markdown: > LaTex uses double backticks at the beginning/upright ticks at the end for > ticks, simple backticks will render as opening simple ticks both at the > beginning/end.
STYLE: Replace
T var; var.Fill(x)
withauto var = MakeFilled<T>(x)
ITK#5024 (comment)