diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-11 19:42:05 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-08 10:29:09 +0100 |
commit | 62c673ccc6f81cee09a25f5acceec2768cea4672 (patch) | |
tree | 883720fc4a6d333dbf3afb7b8276bbd33d202ffc /src/corelib/tools/qarraydatapointer.h | |
parent | a3aa2fcfa72ab69bdbded26dcd43e37b35796a17 (diff) |
Add reference-count manipulation functions to QArrayData and hide ref
The next change will stop using some values in the reference counter as
settings from the data.
Change-Id: I94df1fe643896373fac2f000fff55bc7708fc807
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qarraydatapointer.h')
-rw-r--r-- | src/corelib/tools/qarraydatapointer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h index b7236d485a..86997985d1 100644 --- a/src/corelib/tools/qarraydatapointer.h +++ b/src/corelib/tools/qarraydatapointer.h @@ -58,7 +58,7 @@ public: } QArrayDataPointer(const QArrayDataPointer &other) - : d(other.d->ref.ref() + : d(other.d->ref() ? other.d : other.clone(other.d->cloneFlags())) { @@ -109,7 +109,7 @@ public: ~QArrayDataPointer() { - if (!d->ref.deref()) { + if (!d->deref()) { if (d->isMutable()) (*this)->destroyAll(); Data::deallocate(d); |