diff options
Diffstat (limited to 'src/corelib/tools/qrefcount.h')
-rw-r--r-- | src/corelib/tools/qrefcount.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qrefcount.h b/src/corelib/tools/qrefcount.h index 9223cfe352..e72ddf66b6 100644 --- a/src/corelib/tools/qrefcount.h +++ b/src/corelib/tools/qrefcount.h @@ -57,12 +57,12 @@ class RefCount { public: inline void ref() { - if (atomic >= 0) + if (atomic > 0) atomic.ref(); } inline bool deref() { - if (atomic < 0) + if (atomic <= 0) return true; return atomic.deref(); } |