diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-27 19:00:58 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-28 14:07:56 (GMT) |
commit | 745e12297f0133a6bd54e2809540c47370b405a5 (patch) | |
tree | 2005e5057276771932baa06ab51ac0cc7ed4ca4d | |
parent | 096a0088aa75010c71a2a39dee5f3ee00d23fcf7 (diff) | |
download | Qt-745e12297f0133a6bd54e2809540c47370b405a5.zip Qt-745e12297f0133a6bd54e2809540c47370b405a5.tar.gz Qt-745e12297f0133a6bd54e2809540c47370b405a5.tar.bz2 |
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.
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 4 |
1 files 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<Self *>(::operator new(sizeof(Self))); + ExternalRefCountWithContiguousData *d = + static_cast<ExternalRefCountWithContiguousData *>(::operator new(sizeof(ExternalRefCountWithContiguousData))); // initialize the d-pointer sub-object // leave d->data uninitialized |