Skip to content

Commit 4ec7b93

Browse files
committed
STYLE: Replace itkStaticConstMacro with static constexpr
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
1 parent b8dde3a commit 4ec7b93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/itkCoocurrenceTextureFeaturesImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Statistics
3030
{
3131
template <typename TInputImage, typename TOutputImage, typename TMaskImage>
3232
CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage, TMaskImage>::CoocurrenceTextureFeaturesImageFilter()
33-
: m_NumberOfBinsPerAxis(itkGetStaticConstMacro(DefaultBinsPerAxis))
33+
: m_NumberOfBinsPerAxis(Self::DefaultBinsPerAxis)
3434
, m_HistogramMinimum(NumericTraits<PixelType>::NonpositiveMin())
3535
, m_HistogramMaximum(NumericTraits<PixelType>::max())
3636
, m_InsidePixelValue(NumericTraits<MaskPixelType>::OneValue())

include/itkRunLengthTextureFeaturesImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Statistics
3030
{
3131
template <typename TInputImage, typename TOutputImage, typename TMaskImage>
3232
RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage, TMaskImage>::RunLengthTextureFeaturesImageFilter()
33-
: m_NumberOfBinsPerAxis(itkGetStaticConstMacro(DefaultBinsPerAxis))
33+
: m_NumberOfBinsPerAxis(Self::DefaultBinsPerAxis)
3434
, m_HistogramValueMinimum(NumericTraits<PixelType>::NonpositiveMin())
3535
, m_HistogramValueMaximum(NumericTraits<PixelType>::max())
3636
, m_HistogramDistanceMinimum(NumericTraits<RealType>::ZeroValue())

0 commit comments

Comments
 (0)