Skip to content

Commit

Permalink
STYLE: Replace itkStaticConstMacro with static constexpr
Browse files Browse the repository at this point in the history
Use static constexpr directly now that C++11 conformance
is required by all compilers.

:%s/itkStaticConstMacro *( *\([^,]*\),[ \_s]*\([^,]*\),\_s*\([^)]*\)) */static constexpr \2 \1 = \3/ge

'itkStaticConstMacro(name, type, value)' became unconditionally
identical to 'static constexpr type name = value' with ITK commit
aec95193ab00e1322039911e1032da00f3a103b6 "ENH: Update compiler macros (#810)",
maekclena, 7 May 2019.

'itkGetStaticConstMacro(name)' became unconditionally identical to
'(Self::name)' with ITK commit 84e490b81e3f3c2b0edb89ae7b9de53bfc52f2b2
"Removing some outdated compiler conditionals", Hans Johnson, 31 July
2010.

Most 'itkStaticConstMacro' calls were removed by ITK commit 5c14741e1e063a132ea7e7ee69c5bd0a4e49af74
  • Loading branch information
hjmjohnson authored and SimonRit committed Jan 27, 2025
1 parent ad188e9 commit 5a19579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/Doxygen/doxygen.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ INCLUDE_FILE_PATTERNS =
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = "itkNotUsed(x)=" \
"itkStaticConstMacro(name,type,value)=static constexpr type name = value" \
"static constexpr type name = value=static constexpr type name = value" \
"itkSetInputMacro(name, type, number)= virtual void Set##name##Input(const type *_arg); virtual void SetInput##number(const type *_arg);" \
"itkGetInputMacro(name, type, number)= virtual const type * Get##name##Input() const; virtual const type * GetInput##number() const;" \
"itkSetMacro(name,type)= virtual void Set##name (type _arg);" \
Expand Down

0 comments on commit 5a19579

Please sign in to comment.