From 1e0de796fb2bbc2935d539ca0d6a7ab188dee276 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Fri, 27 Dec 2024 14:29:29 -0600 Subject: [PATCH] STYLE: Prefer static member function Sinc Member function can be made static. Redundant 'inline' specifier on a function declared entirely inside a class definition. --- .../include/itkWindowedSincInterpolateImageFunction.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h index 1c98fbc40cd..dc55964d335 100644 --- a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h @@ -345,11 +345,10 @@ class ITK_TEMPLATE_EXPORT WindowedSincInterpolateImageFunction unsigned int m_WeightOffsetTable[m_OffsetTableSize][ImageDimension]{}; /** The sinc function */ - inline double - Sinc(double x) const + static double + Sinc(const double x) { const double px = Math::pi * x; - return (x == 0.0) ? 1.0 : std::sin(px) / px; } };