summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-29 08:59:40 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-29 09:28:57 (GMT)
commitd5a228fbd44f7dd92a10981a5c835db66e3ea6f8 (patch)
treeb7d1bf57d539b8a58ce65a0cec576f7b21327492 /src
parent138e8c17767959c183b3e00e3fb364ab5b6fbdfd (diff)
downloadQt-d5a228fbd44f7dd92a10981a5c835db66e3ea6f8.zip
Qt-d5a228fbd44f7dd92a10981a5c835db66e3ea6f8.tar.gz
Qt-d5a228fbd44f7dd92a10981a5c835db66e3ea6f8.tar.bz2
Fix compilation in QContiguousCache.
Reviewed-by: TrustMe
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qcontiguouscache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index ef5b238..3785938 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -216,8 +216,8 @@ void QContiguousCache<T>::setCapacity(int asize)
if (asize == d->alloc)
return;
detach();
- union { QContiguousCacheData *p; QContiguousCacheTypedData<T> *d; } x;
- x.p = malloc(asize);
+ union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; } x;
+ x.d = malloc(asize);
x.d->alloc = asize;
x.d->count = qMin(d->count, asize);
x.d->offset = d->offset + d->count - x.d->count;
@@ -239,7 +239,7 @@ void QContiguousCache<T>::setCapacity(int asize)
src--;
}
/* free old */
- free(d);
+ free(p);
d = x.d;
}