diff --git a/Modules/Core/Common/include/itkNumericTraits.h b/Modules/Core/Common/include/itkNumericTraits.h index 65dcdaf3f7a..16ce69396e2 100644 --- a/Modules/Core/Common/include/itkNumericTraits.h +++ b/Modules/Core/Common/include/itkNumericTraits.h @@ -198,14 +198,14 @@ class NumericTraits : public std::numeric_limits * VariableLengthVector will provide a different implementation * where a vector of the correct size is built. */ - static unsigned int + static constexpr unsigned int GetLength(const T &) { return GetLength(); } /** Return the length of the scalar: 1. Array types can return a different value */ - static unsigned int + static constexpr unsigned int GetLength() { return 1; diff --git a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h index 95bff64b64f..581a5745446 100644 --- a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h @@ -161,14 +161,14 @@ class NumericTraits> } /** Return the length of the vector. */ - static unsigned int + static constexpr unsigned int GetLength(const CovariantVector &) { return D; } /** Return the length of the vector. */ - static unsigned int + static constexpr unsigned int GetLength() { return D; diff --git a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h index 0956137270f..809c41aaec0 100644 --- a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h @@ -163,14 +163,14 @@ class NumericTraits> } /** Return the size of the tensor. Always returns 6. */ - static unsigned int + static constexpr unsigned int GetLength(const DiffusionTensor3D &) { return 6; } /** Return the size of the tensor. Always returns 6. */ - static unsigned int + static constexpr unsigned int GetLength() { return 6; diff --git a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h index 3e5ec2590e1..0b2843c0100 100644 --- a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h @@ -157,14 +157,14 @@ class NumericTraits> } /** Return the length of the array. */ - static unsigned int + static constexpr unsigned int GetLength(const FixedArray &) { return D; } /** Return the length of the array. */ - static unsigned int + static constexpr unsigned int GetLength() { return D; diff --git a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h index 53b2217f87f..08eb781e56a 100644 --- a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h @@ -148,14 +148,14 @@ class NumericTraits> } /** Return the dimensionality of the point. */ - static unsigned int + static constexpr unsigned int GetLength(const Point &) { return D; } /** Return the dimensionality of the point. */ - static unsigned int + static constexpr unsigned int GetLength() { return D; diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h index 196cd03c143..422a5da8831 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h @@ -188,14 +188,14 @@ class NumericTraits> } /** Return the dimensionality of the pixel. Always returns 4. */ - static unsigned int + static constexpr unsigned int GetLength(const RGBAPixel &) { return 4; } /** Return the dimensionality of the pixel. Always returns 4. */ - static unsigned int + static constexpr unsigned int GetLength() { return 4; diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h index ff4321f8fc5..4a5884415ce 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h @@ -188,14 +188,14 @@ class NumericTraits> } /** Return the dimensionality of the pixel. Always returns 3. */ - static unsigned int + static constexpr unsigned int GetLength(const RGBPixel &) { return 3; } /** Return the dimensionality of the pixel. Always returns 3. */ - static unsigned int + static constexpr unsigned int GetLength() { return 3; diff --git a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h index 57eb4be881d..6251d0c19f3 100644 --- a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h @@ -163,14 +163,14 @@ class NumericTraits> } /** Return the size of the underlying FixedArray. */ - static unsigned int + static constexpr unsigned int GetLength(const SymmetricSecondRankTensor &) { return GetLength(); } /** Return the size of the underlying FixedArray. */ - static unsigned int + static constexpr unsigned int GetLength() { return D * (D + 1) / 2; diff --git a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h index b705717e0d3..4491be35c0c 100644 --- a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h @@ -203,14 +203,14 @@ class NumericTraits> } /** Return the size of the vector. */ - static unsigned int + static constexpr unsigned int GetLength(const Vector &) { return D; } /** Return the size of the vector. */ - static unsigned int + static constexpr unsigned int GetLength() { return D;