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:
parent
75d2f167f4
commit
a6d6d919fa
@ -5209,9 +5209,7 @@ QDataStream &operator>>(QDataStream &in, QDate &date)
|
||||
// Older versions consider 0 an invalid jd.
|
||||
date.jd = (jd != 0 ? jd : QDate::nullJd());
|
||||
} else {
|
||||
qint64 jd;
|
||||
in >> jd;
|
||||
date.jd = jd;
|
||||
in >> date.jd;
|
||||
}
|
||||
|
||||
return in;
|
||||
|
Loading…
Reference in New Issue
Block a user