From 329a2349aea8338c3a36358b5d8f6fdc8737b1e9 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 6 Feb 2025 13:04:45 +0100 Subject: [PATCH] qmath.h: clean up inclusions We can remove some preprocessor provisions around #include : they're ineffective because is actually already included indirectly (qmath.h -> qglobal.h -> qnumeric.h -> cmath). Leave the inclusion to honor IWYU, but remove the defines around it as they're apparently not necessary at all. While at it, explicitly include qnumeric.h because it's used (for instance, the qIs* fp classification functions called by qmath.h are declared in qnumeric.h). Change-Id: I7d5bf67f518ffd73c81dd78b2bf108df6bbb8186 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmath.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h index 72057ee16d7..daaf2d411ad 100644 --- a/src/corelib/kernel/qmath.h +++ b/src/corelib/kernel/qmath.h @@ -10,23 +10,14 @@ #include #include +#include #if __has_include() && __cplusplus > 201703L #include #endif -#ifndef _USE_MATH_DEFINES -# define _USE_MATH_DEFINES -# define undef_USE_MATH_DEFINES -#endif - #include -#ifdef undef_USE_MATH_DEFINES -# undef _USE_MATH_DEFINES -# undef undef_USE_MATH_DEFINES -#endif - QT_BEGIN_NAMESPACE #define QT_SINE_TABLE_SIZE 256