summaryrefslogtreecommitdiff
path: root/src/corelib/tools/qsharedpointer_impl.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-27 21:00:58 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-28 16:07:56 +0200
commit745e12297f0133a6bd54e2809540c47370b405a5 (patch)
tree2005e5057276771932baa06ab51ac0cc7ed4ca4d /src/corelib/tools/qsharedpointer_impl.h
parent096a0088aa75010c71a2a39dee5f3ee00d23fcf7 (diff)
downloadqt4-tools-745e12297f0133a6bd54e2809540c47370b405a5.tar.gz
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.
Diffstat (limited to 'src/corelib/tools/qsharedpointer_impl.h')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 630ca4f767..3d7a0e6590 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