Skip to content

Commit 8683d42

Browse files
jhlegarretadzenanz
authored andcommitted
COMP: Fix spline order return type in getter macro
Fix spline order return type in getter macro: use `unsigned int` to match the type of the member variable. Fixes: ``` In file included from /home/vsts/work/1/s/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx:34:0: /home/vsts/work/1/s/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx: In function 'int test2DSpline()': /home/vsts/work/1/s/Modules/Core/TestKernel/include/itkTestingMacros.h:220:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] CLANG_SUPPRESS_Wfloat_equal if (variable != command) CLANG_PRAGMA_POP \ /home/vsts/work/1/s/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx:341:5: note: in expansion of macro 'ITK_TEST_SET_GET_VALUE' ITK_TEST_SET_GET_VALUE(splineOrder, interp->GetSplineOrder()); ^~~~~~~~~~~~~~~~~~~~~~ ``` raised for example in: https://dev.azure.com/itkrobotlinux/ITK.Linux/_build/results?buildId=7551&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=f58be928-45a1-58e7-c1ad-04869565b3f4&l=6743
1 parent f548055 commit 8683d42

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT BSplineDecompositionImageFilter : public ImageToImageF
110110
void
111111
SetSplineOrder(unsigned int SplineOrder);
112112

113-
itkGetConstMacro(SplineOrder, int);
113+
itkGetConstMacro(SplineOrder, unsigned int);
114114

115115
/** Get the poles calculated for a given spline order. */
116116
itkGetConstMacro(SplinePoles, SplinePolesVectorType);

Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm
280280
void
281281
SetSplineOrder(unsigned int SplineOrder);
282282

283-
itkGetConstMacro(SplineOrder, int);
283+
itkGetConstMacro(SplineOrder, unsigned int);
284284

285285
void
286286
SetNumberOfWorkUnits(ThreadIdType numThreads);

Modules/Nonunit/Review/include/itkComplexBSplineInterpolateImageFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT ComplexBSplineInterpolateImageFunction
122122
void
123123
SetSplineOrder(unsigned int SplineOrder);
124124

125-
itkGetConstMacro(SplineOrder, int);
125+
itkGetConstMacro(SplineOrder, unsigned int);
126126

127127
/** Set the input image. This must be set by the user, after setting the
128128
spline order! */

0 commit comments

Comments
 (0)