Skip to content

Commit

Permalink
COMP: Fix ramp filter redefinition of itkSetMacro
Browse files Browse the repository at this point in the history
The change is required after InsightSoftwareConsortium/ITK@defa712.
  • Loading branch information
Simon Rit authored and SimonRit committed Apr 30, 2024
1 parent 1a2ca55 commit 4e8331f
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions include/rtkFFTRampImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,29 @@
// The Set macro is redefined to clear the current FFT kernel when a parameter
// is modified.
// clang-format off
#ifndef ITK_GCC_PRAGMA_PUSH
#define ITK_GCC_PRAGMA_PUSH CLANG_PRAGMA_PUSH
#endif
#ifndef ITK_GCC_SUPPRESS_Wfloat_equal
#define ITK_GCC_SUPPRESS_Wfloat_equal CLANG_SUPPRESS_Wfloat_equal
#endif
#ifndef ITK_GCC_PRAGMA_POP
#define ITK_GCC_PRAGMA_POP CLANG_PRAGMA_POP
#endif
#undef itkSetMacro
#define itkSetMacro(name, type) \
virtual void Set##name(type _arg) \
virtual void Set##name(type _arg) \
{ \
itkDebugMacro("setting " #name " to " << _arg); \
CLANG_PRAGMA_PUSH \
CLANG_SUPPRESS_Wfloat_equal \
ITK_GCC_PRAGMA_PUSH \
ITK_GCC_SUPPRESS_Wfloat_equal \
if (this->m_##name != _arg) \
{ \
this->m_##name = std::move(_arg); \
this->m_##name = std::move(_arg); \
this->Modified(); \
this->m_KernelFFT = nullptr; \
} \
CLANG_PRAGMA_POP \
ITK_GCC_PRAGMA_POP \
} \
ITK_MACROEND_NOOP_STATEMENT
// clang-format on
Expand Down Expand Up @@ -172,17 +181,17 @@ class ITK_TEMPLATE_EXPORT FFTRampImageFilter
// clang-format off
#undef itkSetMacro
#define itkSetMacro(name, type) \
virtual void Set##name(type _arg) \
virtual void Set##name(type _arg) \
{ \
itkDebugMacro("setting " #name " to " << _arg); \
CLANG_PRAGMA_PUSH \
CLANG_SUPPRESS_Wfloat_equal \
ITK_GCC_PRAGMA_PUSH \
ITK_GCC_SUPPRESS_Wfloat_equal \
if (this->m_##name != _arg) \
{ \
this->m_##name = std::move(_arg); \
this->m_##name = std::move(_arg); \
this->Modified(); \
} \
CLANG_PRAGMA_POP \
ITK_GCC_PRAGMA_POP \
} \
ITK_MACROEND_NOOP_STATEMENT
// clang-format on
Expand Down

0 comments on commit 4e8331f

Please sign in to comment.