From e54ece9dbb3e05ab0ec36f10b44e0f20af12a624 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 15 Jan 2025 23:07:10 +0100 Subject: [PATCH] QSet: remove misleading bool comparison with 0 Q6Hash::remove() returns a bool, not an integer, like Q5Hash::remove() did. Pick-to: 6.8 6.5 Change-Id: Ia2907c7a2a4177f9b5ad05ca1ef3b9a5baa8137a Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 441a96ba16794dc8621219be705800480654e9e8) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h index 30549840d02..cfa8bac6044 100644 --- a/src/corelib/tools/qset.h +++ b/src/corelib/tools/qset.h @@ -64,7 +64,7 @@ public: inline void clear() { q_hash.clear(); } - inline bool remove(const T &value) { return q_hash.remove(value) != 0; } + bool remove(const T &value) { return q_hash.remove(value); } template inline qsizetype removeIf(Pred predicate)