-
-
Notifications
You must be signed in to change notification settings - Fork 662
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: Change template parameter name prefix N to V #3171
STYLE: Change template parameter name prefix N to V #3171
Conversation
Great job @Leengit 👍 Thanks for addressing the issue that I raised at discussion topic Which initial is preferred for a non-type template parameter, N or V ( Do you think we should then also adjust Utilities/KWStyle/ITK.kws.xml? I don't really know how that works, but the xml code Some minor comments regarding your commit messages:
I'm not sure if that particular SHA (b04d9cd) will make it onto the master branch. During rebase/merge, the SHA of the commit may change. It's probably more safe to just say something like:
But I guess you might as well squash both commits to one, if that's OK to you. I noticed that you add a period ('.') to the subject line of commit messages. Is that really helpful to you? Because it seems a bit odd to me. A large majority of commit messages certainly don't have that period. And it does not seem necessary to me, because it is just the subject, not necessarily a complete English sentence. And as the number of characters preferred for a subject line is limited (maximum 72 character), I wouldn't want to start adding periods to my subject lines! |
8b973b3
to
5b2e05c
Compare
Thank you @N-Dekker for the suggestions. With this force-push, I have merged the commits, removed the SHA code and trailing period from the commit message, and removed |
Modules/Video/BridgeOpenCV/test/itkOpenCVBasicTypeBridgeTest.cxx
Outdated
Show resolved
Hide resolved
5bbf716
to
3813abc
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.
Looks good on a glance. There were also quite some manual interventions here!
I'd like to see how this does with overnight testing runs because it touches a lot of files. If all remains green then this should be good to merge. |
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.
Approved, even though personally I would have preferred consistent use of the N
, rather than the V
as prefix for non-type template parameters.
Please rebase and add the commit to |
3813abc
to
61727ce
Compare
Rebased. Will add to |
f11ae45
to
d5cb301
Compare
This passed all its tests. I have squashed, rebased to current master, and force-pushed. This is ready for merging. |
d5cb301
to
123fa9d
Compare
Errors:
|
I rebased against the newly current master and force-pushed. The strange message from kwrobot-v1 makes it seem like my force-push collided with a merge attempt by someone else. If that's what is going on, attempting the merge again might be the right course of action. If not, please help me to understand the message from kwrobot-v1. |
The KWRobot message came 1 second after my approval, so I think that is what caused it. Your PR is not merged. |
Probably then my force-push collided with your approval; perhaps KWRobot was trying to say that you were approving a commit that had been obsoleted in the seconds before-hand. Perhaps extra caution is appropriate nonetheless. We might wait for the checks to pass (again) before merging. |
Your force-push was 5 minutes before my approval. So no, I can't imagine those two colliding. |
There was a second force push. |
Than that was probably it. I now see that force-push, but I didn't see it when I wrote #3171 (comment). |
STYLE: Remove N as acceptable template parameter name prefix
123fa9d
to
5abb78a
Compare
Because one of the checks was stalled for several days, I just took the opportunity to rebase to the current master branch and force push. There are no other changes. |
This is probably what broke FEM module. It is off by default. I have it enabled locally, for testing. I now run into:
|
@@ -69,7 +69,7 @@ class ITK_TEMPLATE_EXPORT ImageToRectilinearFEMObjectFilter : public ProcessObje | |||
using ImageIndexType = typename InputImageType::IndexType; | |||
|
|||
/** Typedefs for Output FEMObject */ | |||
using FEMObjectType = typename itk::fem::FEMObject<NDimensions>; | |||
using FEMObjectType = typename itk::fem::FEMObject<VDimension>; |
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.
Definition of this on line 60 was not updated.
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.
Addressed in #3201.
Template parameters that are of
typename
have names that start withT
, but for template parameters that are values (e.g.,unsigned int
) rather than types, bothN
andV
have been used as a prefix for their names. This pull request changes instances with prefixN
to have aV
prefix. AdditionallyNDimensions
(plural) is changed toVDimension
(singular).Note that class members (typically
static const(expr)
members) are sometimes named with anN
orV
prefix. Perhaps neither of these prefixes is appropriate by the ITK Style Guide. Nonetheless, these are not changed because outside code, such as ITK modules, might refer to them by their current names.Thanks to @N-Dekker for discovering this issue.
PR Checklist