InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.37k stars 660 forks source link

Macro noop consistency #4745

Closed hjmjohnson closed 5 days ago

hjmjohnson commented 1 week ago

Make macros look like statements in the code

Remove warnings about unnecessary ; use at end of macros that are blocks of code rather than simple statements.

The do {} while(0) idiom can be replaced with a compile time use of the ITK_MACROEND_NOOP_STATEMENT to be consistent and to allow compile time removal of unused statements.

PR Checklist

seanm commented 5 days ago

@hjmjohnson this seems to be overlapping with what @andrei-sandor is already working on in #4724. Perhaps we could coordinate so as not to duplicate work?