mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
Some more cleanup
This commit is contained in:
parent
f67eaa8dec
commit
ab6ea84255
@ -87,13 +87,10 @@ template<class T> bool FITParser::readValue(CTX &ctx, T &val)
|
||||
|
||||
ctx.len -= sizeof(T);
|
||||
|
||||
if (sizeof(T) > 1) {
|
||||
if (ctx.endian)
|
||||
val = qFromBigEndian(data);
|
||||
else
|
||||
val = qFromLittleEndian(data);
|
||||
} else
|
||||
val = data;
|
||||
if (ctx.endian)
|
||||
val = qFromBigEndian(data);
|
||||
else
|
||||
val = qFromLittleEndian(data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -227,10 +227,7 @@ template<class T> bool IMG::readValue(T &val)
|
||||
if (read((char*)&data, sizeof(T)) < (qint64)sizeof(T))
|
||||
return false;
|
||||
|
||||
if (sizeof(T) > 1)
|
||||
val = qFromLittleEndian(data);
|
||||
else
|
||||
val = data;
|
||||
val = qFromLittleEndian(data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -34,10 +34,7 @@ template<class T> bool JNXMap::readValue(T &val)
|
||||
if (_file.read((char*)&data, sizeof(T)) < (qint64)sizeof(T))
|
||||
return false;
|
||||
|
||||
if (sizeof(T) > 1)
|
||||
val = qFromLittleEndian(data);
|
||||
else
|
||||
val = data;
|
||||
val = qFromLittleEndian(data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -32,10 +32,7 @@ template<class T> bool OZF::readValue(T &val)
|
||||
if (_decrypt)
|
||||
decrypt(&data, sizeof(T), _key);
|
||||
|
||||
if (sizeof(T) > 1)
|
||||
val = qFromLittleEndian(data);
|
||||
else
|
||||
val = data;
|
||||
val = qFromLittleEndian(data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user