STYLE: Use macros to Set/Get ivars in Common operators#2568
STYLE: Use macros to Set/Get ivars in Common operators#2568jhlegarreta wants to merge 2 commits intoInsightSoftwareConsortium:mainfrom
Common operators#2568Conversation
|
Not sure about what the errors imply: Suggestions are welcome. |
949d6fc to
5f3afd4
Compare
|
Push forced to see the error reports back and see where we were at this level. |
8a85994 to
7945ba4
Compare
|
I'm sorry but I still don't like to have a C++ Core Guidelines C.132: Don’t make a function virtual without reason says on this topic:
We already spent a lot of time in the last few years, removing ITK/Modules/Core/Common/include/itkMacro.h Lines 1314 to 1326 in 6e3d31d So please only make a member function |
|
Thanks for the comment @N-Dekker . Then, as pointed in this comment of yours I'll mark it to |
7945ba4 to
b342c89
Compare
|
10fce06 might go somehow unnoticed inside the PR and unless one takes a look at the commit history, but did not want to push a PR that added code that was not exercised. Also, I am not sure if all these would get extensive use with time. Open to suggestions. |
| virtual type Get##name() const { return this->m_##name; } \ | ||
| ITK_MACROEND_NOOP_STATEMENT | ||
|
|
||
| /** Get built-in type. Creates a non-virtual member Get"name"() (e.g., GetVisibility()); |
There was a problem hiding this comment.
Niels' PR is more comprehensive, so I would wait with this PR until #2785 is resolved. Then rebase this on top of that, which would make this PR somewhat smaller.
|
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
|
@jhlegarreta Is this still something that needs to be worked on? If so, could you please rebase and make a game plan for what needs to be done? |
Thanks for the heads-up Hans. Still on my ToDo list; have not had the time too look at my ITK-related ToDo list in a while. I do think this still deserves having a go. Not sure when I'll be able to take it up, though. Also, wisest might be to wait until what is mentioned here is resolved/done: #2568 (comment) |
Introduce non-virtual variants for the getter and boolean macros. Use macros to Set/Get ivars in `Common` operators. Take advantage of the commit to leave the documentation of the ivars only in their corresponding Set/Get methods, as dictated by the ITK SW Guide.
Fix typo in `itkGetConstReferenceMacro` macro documentation.
b342c89 to
925ea3f
Compare
|
@jhlegarreta I rebased on top of master. Is there more work that needs to be done to this PR? My reading is that all the issues have been dealt with. |
|
@N-Dekker expressed concerns about this, but going over the files I do not see any of these members being |
|
Per the request to consolidate the scattered It pulls in the 2018 Discourse #814 precedent (the same Suggest holding further design comments on this thread until #6232 has a maintainer-quorum answer on Q1; otherwise the conversation re-fragments. This thread can stay open as the implementation venue once direction is settled. |
|
Closing after offline discussion with @hjmjohnson so that work can make progress without this being a roadblock. |
Use macros to Set/Get ivars in
Commonoperators.Take advantage of the commit to leave the documentation of the ivars only
in their corresponding Set/Get methods, as dictated by the ITK SW Guide.
PR Checklist