From d8ff456b4d762d18d0e3a3b97bb897a826667d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 10 Nov 2011 18:19:19 +0100 Subject: Removed remaining int operations from RefCount RefCount has currently three magic values (-1 for statics, 0 for unsharables, 1 for unshared-sharable). From the API point of view, the individual values are not important or necessary and it's error prone for users of the class to be fiddling with them. Change-Id: I7037cc31d3d062abbad73d04962bc74d85ebd20f Reviewed-by: Robin Burchell Reviewed-by: Olivier Goffart --- src/corelib/tools/qrefcount.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/corelib/tools/qrefcount.h') diff --git a/src/corelib/tools/qrefcount.h b/src/corelib/tools/qrefcount.h index 698351456f..1d2474b6d8 100644 --- a/src/corelib/tools/qrefcount.h +++ b/src/corelib/tools/qrefcount.h @@ -101,15 +101,6 @@ public: return (count != 1) && (count != 0); } - inline bool operator==(int value) const - { return atomic.load() == value; } - inline bool operator!=(int value) const - { return atomic.load() != value; } - inline bool operator!() const - { return !atomic.load(); } - inline operator int() const - { return atomic.load(); } - void initializeOwned() { atomic.store(1); } void initializeUnsharable() { atomic.store(0); } -- cgit v1.2.3