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>
This commit is contained in:
parent
221b123e5d
commit
a2f319e9fb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user