aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristoph Mallon2011-08-07 10:19:30 +0200
committerChristoph Mallon2011-08-07 15:19:08 +0200
commitab80b20a305728ecbe402ab0461c9a10cd7570b5 (patch)
treecac50fcfdc20337789b88f1a62da468ca809e6a8 /common
parente3e0a317e703fe355275a197043ec8e05005ec7b (diff)
downloadscummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.tar.gz
scummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.tar.bz2
scummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.zip
COMMON: Replace x + ARRAYSIZE(x) by the simpler ARRAYEND(x).
Diffstat (limited to 'common')
-rw-r--r--common/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 6e14188f04..a96c7a60c6 100644
--- a/common/util.h
+++ b/common/util.h
@@ -58,6 +58,11 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; }
*/
#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0])))
+/**
+ * Compute a pointer to one past the last element of an array.
+ */
+#define ARRAYEND(x) ((x) + ARRAYSIZE((x)))
+
/**
* @def SCUMMVM_CURRENT_FUNCTION