Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QDataStream &QDataStream::operator>>(float &f)
- {
- if (version() >= QDataStream::Qt_4_6
- && floatingPointPrecision() == QDataStream::DoublePrecision) {
- double d;
- *this >> d;
- f = d;
- return *this;
- }
- f = 0.0f;
- CHECK_STREAM_PRECOND(*this)
- if (dev->read((char *)&f, 4) != 4) {
- f = 0.0f;
- setStatus(ReadPastEnd);
- } else {
- if (!noswap) {
- union {
- float val1;
- quint32 val2;
- } x;
- x.val2 = qbswap(*reinterpret_cast<quint32 *>(&f));
- f = x.val1;
- }
- }
- return *this;
- }
Add Comment
Please, Sign In to add comment