1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Fixed Qt4 build

This commit is contained in:
Martin Tůma 2020-04-09 10:17:30 +02:00
parent eb0ff84379
commit 652cbd7c11

View File

@ -118,17 +118,12 @@ bool FITParser::readData(QFile *file, char *data, size_t size)
template<class T> bool FITParser::readValue(CTX &ctx, T &val)
{
T data;
if (!readData(ctx.file, (char*)&data, sizeof(T)))
if (!readData(ctx.file, (char*)&val, sizeof(T)))
return false;
ctx.len -= sizeof(T);
if (ctx.endian)
val = qFromBigEndian(data);
else
val = qFromLittleEndian(data);
if (sizeof(T) > 1)
val = (ctx.endian) ? qFromBigEndian(val) : qFromLittleEndian(val);
return true;
}