From 745e12297f0133a6bd54e2809540c47370b405a5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 27 Jul 2009 21:00:58 +0200 Subject: Work around weird issue with Sun CC 5.9: Self was the wrong class. I don't know if this was only the debugging symbols or if the compiler was really wrong. But while debugging, Self was ExternalRefCountWithCustomDeleter, which is wrong at this point. --- src/corelib/tools/qsharedpointer_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 630ca4f..3d7a0e6 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -235,7 +235,6 @@ namespace QtSharedPointer { struct ExternalRefCountWithContiguousData: public ExternalRefCountWithDestroyFn { typedef ExternalRefCountWithDestroyFn Parent; - typedef ExternalRefCountWithContiguousData Self; T data; static void deleter(ExternalRefCountData *self) @@ -248,7 +247,8 @@ namespace QtSharedPointer { static inline ExternalRefCountData *create(T **ptr) { DestroyerFn destroy = &deleter; - Self *d = static_cast(::operator new(sizeof(Self))); + ExternalRefCountWithContiguousData *d = + static_cast(::operator new(sizeof(ExternalRefCountWithContiguousData))); // initialize the d-pointer sub-object // leave d->data uninitialized -- cgit v0.12