From 7b0422d46760fec268a89139aceafe37b1a946d9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 5 Feb 2020 14:04:50 +0100 Subject: Remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't support unsharable containers anymore. Change-Id: Ifafa1c9b4eb43d16b3866be3dd74dda1c592f084 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/tools/qcontiguouscache.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index 8cae7d1651..451ba3e8de 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -56,8 +56,6 @@ struct Q_CORE_EXPORT QContiguousCacheData int count; int start; int offset; - uint sharable : 1; - uint reserved : 31; // total is 24 bytes (HP-UX aCC: 40 bytes) // the next entry is already aligned to 8 bytes @@ -96,7 +94,7 @@ public: typedef int size_type; explicit QContiguousCache(int capacity = 0); - QContiguousCache(const QContiguousCache &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + QContiguousCache(const QContiguousCache &v) : d(v.d) { d->ref.ref(); } inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) freeData(p); } @@ -178,8 +176,6 @@ void QContiguousCache::detach_helper() x.d->start = d->start; x.d->offset = d->offset; x.d->alloc = d->alloc; - x.d->sharable = true; - x.d->reserved = 0; T *dest = x.p->array + x.d->start; T *src = p->array + d->start; @@ -267,7 +263,6 @@ void QContiguousCache::clear() x.d->ref.storeRelaxed(1); x.d->alloc = d->alloc; x.d->count = x.d->start = x.d->offset = 0; - x.d->sharable = true; if (!d->ref.deref()) freeData(p); d = x.d; } @@ -287,7 +282,6 @@ QContiguousCache::QContiguousCache(int cap) d->ref.storeRelaxed(1); d->alloc = cap; d->count = d->start = d->offset = 0; - d->sharable = true; } template @@ -297,8 +291,6 @@ QContiguousCache &QContiguousCache::operator=(const QContiguousCache &o if (!d->ref.deref()) freeData(p); d = other.d; - if (!d->sharable) - detach_helper(); return *this; } -- cgit v1.2.3