Trivial simplification in QDataStream &operator>>(..., QDate &)

The target date.jd is a qint64, so no need for a separate variable of
the same type to read into before copying to it.

Change-Id: I6f8990f6a74a785db205b8e2af1a3e3684759cd4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2022-08-25 13:59:11 +02:00
parent 75d2f167f4
commit a6d6d919fa

View File

@ -5209,9 +5209,7 @@ QDataStream &operator>>(QDataStream &in, QDate &date)
// Older versions consider 0 an invalid jd. // Older versions consider 0 an invalid jd.
date.jd = (jd != 0 ? jd : QDate::nullJd()); date.jd = (jd != 0 ? jd : QDate::nullJd());
} else { } else {
qint64 jd; in >> date.jd;
in >> jd;
date.jd = jd;
} }
return in; return in;