diff options
author | Oliver Kiehl | 2003-05-21 18:45:58 +0000 |
---|---|---|
committer | Oliver Kiehl | 2003-05-21 18:45:58 +0000 |
commit | c78230bf47fb0b4151e4f394fc28ef3957d3ded5 (patch) | |
tree | 4bc5363411bf9b30633438fdce02c66c0d7d1dd6 /common | |
parent | cc2f0e634345ccc67792c825904695635336c8bb (diff) | |
download | scummvm-rg350-c78230bf47fb0b4151e4f394fc28ef3957d3ded5.tar.gz scummvm-rg350-c78230bf47fb0b4151e4f394fc28ef3957d3ded5.tar.bz2 scummvm-rg350-c78230bf47fb0b4151e4f394fc28ef3957d3ded5.zip |
pedantic fixes (little endian version)
svn-id: r7798
Diffstat (limited to 'common')
-rw-r--r-- | common/scummsys.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index a7ca0b6b48..224df158ff 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -319,31 +319,31 @@ #if defined(SCUMM_NEED_ALIGNMENT) FORCEINLINE uint READ_LE_UINT16(const void *ptr) { - return (((byte *)ptr)[1] << 8)|((byte *)ptr)[0]; + return (((const byte *)ptr)[1] << 8)|((const byte *)ptr)[0]; } #else FORCEINLINE uint READ_LE_UINT16(const void *ptr) { - return *(uint16 *)(ptr); + return *(const uint16 *)(ptr); } #endif FORCEINLINE uint READ_BE_UINT16(const void *ptr) { - return (((byte *)ptr)[0] << 8)|((byte *)ptr)[1]; + return (((const byte *)ptr)[0] << 8)|((const byte *)ptr)[1]; } #if defined(SCUMM_NEED_ALIGNMENT) FORCEINLINE uint32 READ_LE_UINT32(const void *ptr) { - byte *b = (byte *)ptr; + const byte *b = (const byte *)ptr; return (b[3] << 24) + (b[2] <<16) + (b[1] << 8) + (b[0]); } #else FORCEINLINE uint32 READ_LE_UINT32(const void *ptr) { - return *(uint32 *)(ptr); + return *(const uint32 *)(ptr); } #endif FORCEINLINE uint32 READ_BE_UINT32(const void *ptr) { - byte *b = (byte *)ptr; + const byte *b = (const byte *)ptr; return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]); } |