From 5fd5f9da3b4b433d43a4fe5c6d1a07cbc4712128 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 21 Jul 2009 16:33:25 +0200 Subject: Silence compiler warnings on shadowing of member functions. --- src/corelib/tools/qcontiguouscache.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index 7d52f1e..0020d22 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -166,8 +166,8 @@ void QContiguousCache::detach_helper() T *dest = x.d->array + x.d->start; T *src = d->array + d->start; - int count = x.d->count; - while (count--) { + int oldcount = x.d->count; + while (oldcount--) { if (QTypeInfo::isComplex) { new (dest) T(*src); } else { @@ -200,8 +200,8 @@ void QContiguousCache::setCapacity(int asize) x.d->start = x.d->offset % x.d->alloc; T *dest = x.d->array + (x.d->start + x.d->count-1) % x.d->alloc; T *src = d->array + (d->start + d->count-1) % d->alloc; - int count = x.d->count; - while (count--) { + int oldcount = x.d->count; + while (oldcount--) { if (QTypeInfo::isComplex) { new (dest) T(*src); } else { @@ -224,10 +224,10 @@ void QContiguousCache::clear() { if (d->ref == 1) { if (QTypeInfo::isComplex) { - int count = d->count; + int oldcount = d->count; T * i = d->array + d->start; T * e = d->array + d->alloc; - while (count--) { + while (oldcount--) { i->~T(); i++; if (i == e) @@ -254,11 +254,11 @@ inline QContiguousCacheData *QContiguousCache::malloc(int aalloc) } template -QContiguousCache::QContiguousCache(int capacity) +QContiguousCache::QContiguousCache(int cap) { - p = malloc(capacity); + p = malloc(cap); d->ref = 1; - d->alloc = capacity; + d->alloc = cap; d->count = d->start = d->offset = 0; d->sharable = true; } @@ -295,10 +295,10 @@ template void QContiguousCache::free(Data *x) { if (QTypeInfo::isComplex) { - int count = d->count; + int oldcount = d->count; T * i = d->array + d->start; T * e = d->array + d->alloc; - while (count--) { + while (oldcount--) { i->~T(); i++; if (i == e) -- cgit v0.12