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 committed Jan 26, 2025
1 parent 0d89783 commit 2bd1bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/itkMorphologicalOpenningFeatureGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ITK_EXPORT MorphologicalOpenningFeatureGenerator : public FeatureGenerator
itkOverrideGetNameOfClassMacro(MorphologicalOpenningFeatureGenerator);

/** Dimension of the space */
itkStaticConstMacro(Dimension, unsigned int, NDimension);
static constexpr unsigned int Dimension = NDimension;

/** Type of spatialObject that will be passed as input to this
* feature generator. */
Expand Down

0 comments on commit 2bd1bf3

Please sign in to comment.