diff options
author | tron <tron@openttd.org> | 2005-07-21 06:31:02 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-21 06:31:02 +0000 |
commit | d71788c40206fa35b792d34769fde7768b4456c1 (patch) | |
tree | dc5c9c74cec9bfa29f94932a20193cd902a80f15 /saveload.c | |
parent | 5c5840417e2f03514c51098f4786c6c1d6030b59 (diff) | |
download | openttd-d71788c40206fa35b792d34769fde7768b4456c1.tar.xz |
(svn r2660) Get rid of some more shifting/anding/casting
Diffstat (limited to 'saveload.c')
-rw-r--r-- | saveload.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/saveload.c b/saveload.c index 3c561f821..bef3ef6f9 100644 --- a/saveload.c +++ b/saveload.c @@ -123,14 +123,14 @@ static inline uint64 SlReadUint64(void) static inline void SlWriteUint16(uint16 v) { - SlWriteByte((byte)(v >> 8)); - SlWriteByte((byte)v); + SlWriteByte(GB(v, 8, 8)); + SlWriteByte(GB(v, 0, 8)); } static inline void SlWriteUint32(uint32 v) { - SlWriteUint16((uint16)(v >> 16)); - SlWriteUint16((uint16)v); + SlWriteUint16(GB(v, 16, 16)); + SlWriteUint16(GB(v, 0, 16)); } static inline void SlWriteUint64(uint64 x) |