summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-17 15:06:50 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-06-20 06:53:10 +0000
commita2f319e9fb2f7595fc16d0d79e26438463051a53 (patch)
treec7373751cb543556065ab3d2e1f28875056c702d /src/corelib
parent221b123e5d5bdfe5400621f3e4cb15d40158c0a5 (diff)
Fix MSVC warning about casting to pointer of different size
qdatetime.cpp(2834): warning C4312: 'reinterpret_cast': conversion from 'int' to 'QDateTimePrivate *' of greater size Change-Id: Ib57b52598e2f452985e9fffd1458fe3ba3fcfb48 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qdatetime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 2ebf7c7977..140a5c1eaf 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2737,7 +2737,7 @@ static QPair<QDate, QTime> getDateTime(const QDateTimeData &d)
inline QDateTime::Data::Data(Qt::TimeSpec spec)
{
if (CanBeSmall && Q_LIKELY(specCanBeSmall(spec))) {
- d = reinterpret_cast<QDateTimePrivate *>(int(mergeSpec(QDateTimePrivate::ShortData, spec)));
+ d = reinterpret_cast<QDateTimePrivate *>(quintptr(mergeSpec(QDateTimePrivate::ShortData, spec)));
} else {
// the structure is too small, we need to detach
d = new QDateTimePrivate;