Skip to content

Commit

Permalink
ENH: Default to allow ITK_MACROEND_NOOP_STATEMENT
Browse files Browse the repository at this point in the history
The ITK_MACROEND_NOOP_STATEMENT is always supported
in compilers, and allows macros to be used with
semi-colons without warnings or clang-format
inconsistencies.
  • Loading branch information
hjmjohnson committed Jun 3, 2024
1 parent e35e66e commit 84a8e4d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Modules/Core/Common/include/itkMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,7 @@ namespace itk
* */
#define ITK_NOOP_STATEMENT static_assert(true, "")


#if defined(ITK_FUTURE_LEGACY_REMOVE)

# define ITK_MACROEND_NOOP_STATEMENT ITK_NOOP_STATEMENT
#else
/* NOTE: The ITK_MACROEND_NOOP_STATEMENT must be defined to nothing
* in order to maintain backwards compatibility with earlier macro
* uses that may or may not have ';' after the macro is used. */
/* Purposefully empty */
# define ITK_MACROEND_NOOP_STATEMENT
#endif
#define ITK_MACROEND_NOOP_STATEMENT ITK_NOOP_STATEMENT
// clang-format on

// Define ITK_PRAGMA macro.
Expand Down

0 comments on commit 84a8e4d

Please # to comment.