From 10f6e6bc5e9992545839037353c4ddc9e6a4c16f Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sun, 4 Dec 2022 13:08:45 +0100 Subject: [PATCH] STYLE: Do not suppress clang "-Wfloat-equal" inside `itkSetObjectMacro` The macro definition does not do any floating point comparison. --- Modules/Core/Common/include/itkMacro.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 397984127cd..2d51c4ca42d 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -1089,7 +1089,6 @@ compilers. // clang-format on // clang-format off -// NOTE: warning: comparing floating point with == or != is unsafe [-Wfloat-equal] /** Set pointer to object; uses Object reference counting methodology. * Creates method Set"name"() (e.g., SetPoints()). Note that using * smart pointers requires using real pointers when setting input, @@ -1098,14 +1097,11 @@ compilers. virtual void Set##name(type * _arg) \ { \ itkDebugMacro("setting " << #name " to " << _arg); \ - CLANG_PRAGMA_PUSH \ - CLANG_SUPPRESS_Wfloat_equal \ if (this->m_##name != _arg) \ { \ this->m_##name = _arg; \ this->Modified(); \ } \ - CLANG_PRAGMA_POP \ } \ ITK_MACROEND_NOOP_STATEMENT // clang-format on