remove unused macros, and add SAL_N_ELEMENTS
This commit is contained in:
parent
d08754a844
commit
2f0803e586
1 changed files with 6 additions and 10 deletions
|
@ -31,6 +31,7 @@
|
|||
#ifndef SAL_MAX
|
||||
# define SAL_MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef SAL_MIN
|
||||
# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
@ -39,13 +40,8 @@
|
|||
# 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)))
|
||||
#ifndef SAL_N_ELEMENTS
|
||||
# define SAL_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef SAL_SWAP
|
||||
# define SAL_SWAP(a,b) ((a) ^= (b) ^= (a) ^= (b))
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue