aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2003-03-13 01:06:38 +0000
committerMax Horn2003-03-13 01:06:38 +0000
commitb6113a25683d0853b8906d7b6ac2e2748266bff0 (patch)
tree27439b04b6a8d302d4d0a88c77936919fc9d1b1d /common
parentd143164eac2c2ca1ca82be6effea1a765c5521b1 (diff)
downloadscummvm-rg350-b6113a25683d0853b8906d7b6ac2e2748266bff0.tar.gz
scummvm-rg350-b6113a25683d0853b8906d7b6ac2e2748266bff0.tar.bz2
scummvm-rg350-b6113a25683d0853b8906d7b6ac2e2748266bff0.zip
added const qualifier
svn-id: r6806
Diffstat (limited to 'common')
-rw-r--r--common/scummsys.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index 6e5babbc84..5063cef29d 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -280,31 +280,31 @@
#endif
#if defined(SCUMM_NEED_ALIGNMENT)
- FORCEINLINE uint READ_LE_UINT16(void *ptr) {
+ FORCEINLINE uint READ_LE_UINT16(const void *ptr) {
return (((byte *)ptr)[1] << 8)|((byte *)ptr)[0];
}
#else
- FORCEINLINE uint READ_LE_UINT16(void *ptr) {
+ FORCEINLINE uint READ_LE_UINT16(const void *ptr) {
return *(uint16 *)(ptr);
}
#endif
- FORCEINLINE uint READ_BE_UINT16(void *ptr) {
+ FORCEINLINE uint READ_BE_UINT16(const void *ptr) {
return (((byte *)ptr)[0] << 8)|((byte *)ptr)[1];
}
#if defined(SCUMM_NEED_ALIGNMENT)
- FORCEINLINE uint32 READ_LE_UINT32(void *ptr) {
+ FORCEINLINE uint32 READ_LE_UINT32(const void *ptr) {
byte *b = (byte *)ptr;
return (b[3] << 24) + (b[2] <<16) + (b[1] << 8) + (b[0]);
}
#else
- FORCEINLINE uint32 READ_LE_UINT32(void *ptr) {
+ FORCEINLINE uint32 READ_LE_UINT32(const void *ptr) {
return *(uint32 *)(ptr);
}
#endif
- FORCEINLINE uint32 READ_BE_UINT32(void *ptr) {
+ FORCEINLINE uint32 READ_BE_UINT32(const void *ptr) {
byte *b = (byte *)ptr;
return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]);
}
@@ -342,29 +342,29 @@
#define TO_LE_32 FROM_LE_32
#define TO_LE_16 FROM_LE_16
- uint32 FORCEINLINE READ_LE_UINT32(void *ptr) {
+ uint32 FORCEINLINE READ_LE_UINT32(const void *ptr) {
byte *b = (byte *)ptr;
return (b[3] << 24) + (b[2] << 16) + (b[1] << 8) + (b[0]);
}
- uint32 FORCEINLINE READ_BE_UINT32(void *ptr) {
+ uint32 FORCEINLINE READ_BE_UINT32(const void *ptr) {
return *(uint32 *)(ptr);
}
- uint FORCEINLINE READ_LE_UINT16(void *ptr) {
+ uint FORCEINLINE READ_LE_UINT16(const void *ptr) {
byte *b = (byte *)ptr;
return (b[1] << 8) + b[0];
}
- uint FORCEINLINE READ_BE_UINT16(void *ptr) {
+ uint FORCEINLINE READ_BE_UINT16(const void *ptr) {
return *(uint16 *)(ptr);
}
- uint FORCEINLINE READ_BE_UINT16_UNALIGNED(void *ptr) {
+ uint FORCEINLINE READ_BE_UINT16_UNALIGNED(const void *ptr) {
return (((byte *)ptr)[0] << 8)|((byte *)ptr)[1];
}
- uint32 FORCEINLINE READ_BE_UINT32_UNALIGNED(void *ptr) {
+ uint32 FORCEINLINE READ_BE_UINT32_UNALIGNED(const void *ptr) {
byte *b = (byte*)ptr;
return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]);
}