From 7fadc3ce322706ed6c36ad907e83fed1992b490e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 16 Dec 2011 17:22:45 +0100 Subject: Get rid of assignment operators in RefCount , and make it strictly a POD struct. Since this operator was only being used to set the initial (owned) value of the reference count, the name of the function introduced here to replace it makes that use case explicit. Change-Id: I2feadd2ac35dcb75ca211471baf5044a5f57cd62 Reviewed-by: Olivier Goffart Reviewed-by: Thiago Macieira --- src/corelib/tools/qrefcount.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qrefcount.h') diff --git a/src/corelib/tools/qrefcount.h b/src/corelib/tools/qrefcount.h index 619f61e072..6d030cc0b3 100644 --- a/src/corelib/tools/qrefcount.h +++ b/src/corelib/tools/qrefcount.h @@ -75,10 +75,8 @@ public: { return !atomic.load(); } inline operator int() const { return atomic.load(); } - inline RefCount &operator=(int value) - { atomic.store(value); return *this; } - inline RefCount &operator=(const RefCount &other) - { atomic.store(other.atomic.load()); return *this; } + + void initializeOwned() { atomic.store(1); } QBasicAtomicInt atomic; }; -- cgit v1.2.3