aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
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