mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Fixed Qt4 build
This commit is contained in:
parent
eb0ff84379
commit
652cbd7c11
@ -118,17 +118,12 @@ bool FITParser::readData(QFile *file, char *data, size_t size)
|
|||||||
|
|
||||||
template<class T> bool FITParser::readValue(CTX &ctx, T &val)
|
template<class T> bool FITParser::readValue(CTX &ctx, T &val)
|
||||||
{
|
{
|
||||||
T data;
|
if (!readData(ctx.file, (char*)&val, sizeof(T)))
|
||||||
|
|
||||||
if (!readData(ctx.file, (char*)&data, sizeof(T)))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ctx.len -= sizeof(T);
|
ctx.len -= sizeof(T);
|
||||||
|
if (sizeof(T) > 1)
|
||||||
if (ctx.endian)
|
val = (ctx.endian) ? qFromBigEndian(val) : qFromLittleEndian(val);
|
||||||
val = qFromBigEndian(data);
|
|
||||||
else
|
|
||||||
val = qFromLittleEndian(data);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user