mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
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:
parent
7a86ea2d41
commit
167977dfd9
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue