summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-13 12:59:40 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-13 15:28:26 (GMT)
commit07fcb3b032526e76086d7f75dad01b867233b5d5 (patch)
tree6893857ef4c71f6d67d1acf96cb06d6f0aa94bde /src/corelib/global
parenta2cc46c89e73d089f333423f8382eb7582699e39 (diff)
downloadQt-07fcb3b032526e76086d7f75dad01b867233b5d5.zip
Qt-07fcb3b032526e76086d7f75dad01b867233b5d5.tar.gz
Qt-07fcb3b032526e76086d7f75dad01b867233b5d5.tar.bz2
Add QIntegerForSize<1> and QIntegerForSize<2>.
Undocumented, but maybe they're useful somewhere. It doesn't hurt to add them.
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 7076a1e..5a2c329 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -848,6 +848,8 @@ typedef quint64 qulonglong;
&& sizeof(void *) == sizeof(qptrdiff)
*/
template <int> struct QIntegerForSize;
+template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; };
+template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; };
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)> { };