diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-20 09:29:40 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-20 09:29:40 (GMT) |
commit | 33afa6c1fbe230dec4eea435f9ad5d4141c128a8 (patch) | |
tree | 2ace5c779c10288503b348a8d8bac8748dad0cae /src/corelib/global | |
parent | ee1e6222114028c2ff181f972e32f15011723b5f (diff) | |
parent | 9f668a352df15404234ea30bc9bb0c1ef774c1b0 (diff) | |
download | Qt-33afa6c1fbe230dec4eea435f9ad5d4141c128a8.zip Qt-33afa6c1fbe230dec4eea435f9ad5d4141c128a8.tar.gz Qt-33afa6c1fbe230dec4eea435f9ad5d4141c128a8.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 5fd05c0..f058b36 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -821,17 +821,12 @@ typedef quint64 qulonglong; sizeof(void *) == sizeof(quintptr) && sizeof(void *) == sizeof(qptrdiff) */ -template <int> class QUintForSize { private: typedef void Type; }; -template <> class QUintForSize<4> { public: typedef quint32 Type; }; -template <> class QUintForSize<8> { public: typedef quint64 Type; }; -template <typename T> class QUintForType : public QUintForSize<sizeof(T)> { }; -typedef QUintForType<void *>::Type quintptr; - -template <int> class QIntForSize { private: typedef void Type; }; -template <> class QIntForSize<4> { public: typedef qint32 Type; }; -template <> class QIntForSize<8> { public: typedef qint64 Type; }; -template <typename T> class QIntForType : public QIntForSize<sizeof(T)> { }; -typedef QIntForType<void *>::Type qptrdiff; +template <int> struct QIntegerForSize; +template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; }; +template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; }; +template <class T> struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { }; +typedef QIntegerForSizeof<void*>::Unsigned quintptr; +typedef QIntegerForSizeof<void*>::Signed qptrdiff; /* Useful type definitions for Qt |