From f4e12a0b4b2f3f99660069535cc3415d6f826132 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sun, 26 Sep 2021 11:46:34 +0200 Subject: [PATCH] STYLE: Replace itkStaticConstMacro ImageSink, BinaryGeneratorImageFilter Replaced the remaining `itkStaticConstMacro` calls in ITK, from the header files of `ImageSink` and `BinaryGeneratorImageFilter`, by the corresponding `static constexpr` member declarations. Follow-up to commit 5c14741e1e063a132ea7e7ee69c5bd0a4e49af74 "STYLE: Replace itkStaticConstMacro with static constexpr", by Hans Johnson, 2 February 2018. --- Modules/Core/Common/include/itkImageSink.h | 2 +- .../ImageFilterBase/include/itkBinaryGeneratorImageFilter.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Core/Common/include/itkImageSink.h b/Modules/Core/Common/include/itkImageSink.h index e92e7d0a963..9fb67ceea7e 100644 --- a/Modules/Core/Common/include/itkImageSink.h +++ b/Modules/Core/Common/include/itkImageSink.h @@ -82,7 +82,7 @@ class ImageSink using typename Superclass::DataObjectIdentifierType; /** Dimension of input images. */ - itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension); + static constexpr unsigned int InputImageDimension = InputImageType::ImageDimension; using Superclass::SetInput; diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.h index b7262146ce1..fd7e6606c92 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.h @@ -211,9 +211,9 @@ class ITK_TEMPLATE_EXPORT BinaryGeneratorImageFilter : public InPlaceImageFilter /** ImageDimension constants */ - itkStaticConstMacro(InputImage1Dimension, unsigned int, TInputImage1::ImageDimension); - itkStaticConstMacro(InputImage2Dimension, unsigned int, TInputImage2::ImageDimension); - itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); + static constexpr unsigned int InputImage1Dimension = TInputImage1::ImageDimension; + static constexpr unsigned int InputImage2Dimension = TInputImage2::ImageDimension; + static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking