From 997b69bd73ddac0f0fd84c281c2c53b98871a5a3 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 2 Dec 2024 13:59:44 -0600 Subject: [PATCH] STYLE: Order static inline consistently Prefer 'static inline' ordering to 'inline static' for toolkit consistency. Both static inline and inline static are allowed and they mean the same thing. static inline is preferred. "storage class specifiers" like static are prefered to come first in a declaration. --- .../include/itkBSplineDerivativeKernelFunction.h | 10 +++++----- Modules/Core/Common/include/itkBSplineKernelFunction.h | 10 +++++----- Modules/Core/Common/include/itkImageHelper.h | 4 ++-- .../ImageNoise/include/itkNoiseBaseImageFilter.h | 2 +- .../Common/include/itkImageToImageMetric.h | 2 +- ...ormableSimplexMesh3DGradientConstraintForceFilter.h | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h b/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h index 4da2b65cb10..cd7c62e43f8 100644 --- a/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h +++ b/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h @@ -95,14 +95,14 @@ class ITK_TEMPLATE_EXPORT BSplineDerivativeKernelFunction : public KernelFunctio {}; /** Evaluate the function: zeroth order spline. */ - inline static TRealValueType + static inline TRealValueType Evaluate(const Dispatch<0> &, const TRealValueType & itkNotUsed(u)) { return TRealValueType{ 0.0 }; } /** Evaluate the function: first order spline */ - inline static TRealValueType + static inline TRealValueType Evaluate(const Dispatch<1> &, const TRealValueType & u) { if (Math::ExactlyEquals(u, TRealValueType{ -1.0 })) @@ -132,7 +132,7 @@ class ITK_TEMPLATE_EXPORT BSplineDerivativeKernelFunction : public KernelFunctio } /** Evaluate the function: second order spline. */ - inline static TRealValueType + static inline TRealValueType Evaluate(const Dispatch<2> &, const TRealValueType & u) { if ((u > TRealValueType{ -0.5 }) && (u < TRealValueType{ 0.5 })) @@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT BSplineDerivativeKernelFunction : public KernelFunctio } /** Evaluate the function: third order spline. */ - inline static TRealValueType + static inline TRealValueType Evaluate(const Dispatch<3> &, const TRealValueType & u) { if ((u >= TRealValueType{ 0.0 }) && (u < TRealValueType{ 1.0 })) @@ -180,7 +180,7 @@ class ITK_TEMPLATE_EXPORT BSplineDerivativeKernelFunction : public KernelFunctio } /** Evaluate the function: unimplemented spline order */ - inline static TRealValueType + static inline TRealValueType Evaluate(const DispatchBase &, const TRealValueType &) { itkGenericExceptionMacro("Evaluate not implemented for spline order " << SplineOrder); diff --git a/Modules/Core/Common/include/itkBSplineKernelFunction.h b/Modules/Core/Common/include/itkBSplineKernelFunction.h index 63dbd17b2ae..0213fce314d 100644 --- a/Modules/Core/Common/include/itkBSplineKernelFunction.h +++ b/Modules/Core/Common/include/itkBSplineKernelFunction.h @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction : public KernelFunctionBase &, const TRealValueType & u) { const TRealValueType absValue = itk::Math::abs(u); @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction : public KernelFunctionBase &, const TRealValueType & u) { const TRealValueType absValue = itk::Math::abs(u); @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction : public KernelFunctionBase &, const TRealValueType & u) { const TRealValueType absValue = itk::Math::abs(u); @@ -152,7 +152,7 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction : public KernelFunctionBase &, const TRealValueType & u) { const TRealValueType absValue = itk::Math::abs(u); @@ -176,7 +176,7 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction : public KernelFunctionBase::PrintType>(val.point) << std::endl; diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h index 7522172b1cd..12d04986e23 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h @@ -96,7 +96,7 @@ class ImageVoxel m_Value = val; } - inline friend std::ostream & + friend inline std::ostream & operator<<(std::ostream & os, const ImageVoxel & val) { os << "Vpos: " << val.m_Vpos << std::endl;