Ensure ShortNoSwap is always uint16_t.

It turns out gcc on little endian machines didn't guarantee the type of
ShortNoSwap due to it being a macro that just returned its parameter. At
the same time, LongNoSwap and FloatNoSwap have been fixed.
This commit is contained in:
Bill Currie 2012-12-30 11:38:55 +09:00
parent 7a86ea2d41
commit 167977dfd9

View file

@ -103,9 +103,9 @@ float _FloatNoSwap (float f);
#define FloatSwap(l) _FloatSwap (l)
#endif
#define ShortNoSwap(l) (l)
#define LongNoSwap(l) (l)
#define FloatNoSwap(l) (l)
#define ShortNoSwap(l) ((uint16_t) (l))
#define LongNoSwap(l) ((uint32_t) (l))
#define FloatNoSwap(l) ((float) (l))
// NOTE: these /always/ read and write /little/ endian entities.
struct QFile_s;