From 23c2aea7ce6379927609109e18c6252fbee68fbc Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 2 Sep 2009 13:35:15 +0200 Subject: Fix gcc compiler warning about unsigned/signed integer comparison gcc 4.4.3 with option "-Wall" complained about 'comparison between signed and unsigned integer expressons' in every code path using testFlag(). Reviewed-by: Frans Englich --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index d22a863..c021cd6 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2170,7 +2170,7 @@ public: inline bool operator!() const { return !i; } - inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == f ); } + inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == (int)f ); } }; #define Q_DECLARE_FLAGS(Flags, Enum)\ -- cgit v0.12