diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-01-12 15:39:17 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 17:40:18 +0100 |
commit | 3249aab539b37a98d75329598bd6838082a8158e (patch) | |
tree | f70fce858cc08c4a82338d32a78069f07eea8a2b /src/corelib/tools/qlinkedlist.h | |
parent | cc568ec342161edee01ecae74ac11bb4c2da46b7 (diff) |
Don't use RefCount int operators
, as those are going away.
The comment in QString/QByteArray::squeeze about shared_null was updated as it
also affects other static data, such as that generated by QStringLiteral and
QByteArrayLiteral.
Change-Id: I26a757d29db62b1e3566a1f7c8d4030918ed8a89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qlinkedlist.h')
-rw-r--r-- | src/corelib/tools/qlinkedlist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h index 279eda673a..e8696eb5f9 100644 --- a/src/corelib/tools/qlinkedlist.h +++ b/src/corelib/tools/qlinkedlist.h @@ -95,8 +95,8 @@ public: inline int size() const { return d->size; } inline void detach() - { if (d->ref != 1) detach_helper(); } - inline bool isDetached() const { return d->ref == 1; } + { if (d->ref.isShared()) detach_helper(); } + inline bool isDetached() const { return !d->ref.isShared(); } inline void setSharable(bool sharable) { if (!sharable) detach(); if (d != &QLinkedListData::shared_null) d->sharable = sharable; } inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; } |