[Libreoffice-commits] .: sal/inc
Michael Meeks
mmeeks at kemper.freedesktop.org
Fri Oct 8 06:31:09 PDT 2010
sal/inc/sal/macros.h | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
New commits:
commit 7eacf3ea5fe2efb92039301d687533fa042915ff
Author: Michael Meeks <michael.meeks at novell.com>
Date: Fri Oct 8 14:26:28 2010 +0100
remove unused macros, and add SAL_N_ELEMENTS
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index 53892f5..76c659b 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -29,23 +29,19 @@
#define _SAL_MACROS_H_
#ifndef SAL_MAX
-# define SAL_MAX(a,b) (((a) > (b)) ? (a) : (b))
+# define SAL_MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
+
#ifndef SAL_MIN
-# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
+# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef SAL_FIELDOFFSET
-# define SAL_FIELDOFFSET(type, field) ((sal_Int32)(&((type *)16)->field) - 16)
-#endif
-
-#ifndef SAL_BOUND
-# define SAL_BOUND(x,l,h) ((x) <= (l) ? (l) : ((x) >= (h) ? (h) : (x)))
+# define SAL_FIELDOFFSET(type, field) ((sal_Int32)(&((type *)16)->field) - 16)
#endif
-#ifndef SAL_SWAP
-# define SAL_SWAP(a,b) ((a) ^= (b) ^= (a) ^= (b))
+#ifndef SAL_N_ELEMENTS
+# define SAL_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
#endif
-
#endif
More information about the Libreoffice-commits
mailing list