Skip to content

Commit 0e08f74

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
1 parent 55eff3e commit 0e08f74

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

include/itkArrivalFunctionToPathFilter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ class ITK_EXPORT ArrivalFunctionToPathFilter :
168168
typedef typename OutputPathType::ConstPointer OutputPathConstPointer;
169169

170170
/** ImageDimension constants. */
171-
itkStaticConstMacro(InputImageDimension, unsigned int,
172-
InputImageType::ImageDimension);
171+
static constexpr unsigned int InputImageDimension = InputImageType::ImageDimension;
173172

174173
/** Some convenient typedefs. */
175174
typedef Index< InputImageDimension > IndexType;

include/itkPhysicalCentralDifferenceImageFunction.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
4848
{
4949
public:
5050
/** Dimension underlying input image. */
51-
itkStaticConstMacro(ImageDimension, unsigned int,
52-
TInputImage::ImageDimension);
51+
static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
5352

5453
/** Standard class typedefs. */
5554
typedef PhysicalCentralDifferenceImageFunction Self;

include/itkSingleImageCostFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ITK_EXPORT SingleImageCostFunction :
8383
typedef typename ImageType::ConstPointer ImageConstPointer;
8484

8585
/** Constant for the image dimension */
86-
itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
86+
static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
8787

8888
/** Type used for representing point components */
8989
typedef Superclass::ParametersValueType CoordRepType;

include/itkSpeedFunctionToPathFilter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ class ITK_EXPORT SpeedFunctionToPathFilter :
8080
itkNewMacro(Self);
8181

8282
/** ImageDimension constants */
83-
itkStaticConstMacro(InputImageDimension, unsigned int,
84-
TInputImage::ImageDimension);
83+
static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
8584

8685
/** Some image typedefs. */
8786
typedef TInputImage InputImageType;

0 commit comments

Comments
 (0)