std-aux: remove NM_CONST_MAX()

We now can use either NM_MAX() or NM_MAX_CONST() instead. Drop this.
This commit is contained in:
Thomas Haller
2023-10-30 08:25:17 +01:00
parent ca4401e327
commit 559d071f8d

View File

@@ -459,13 +459,6 @@ nm_mult_clamped_u(unsigned a, unsigned b)
(((cmp(_a, _b)) >= 0) ? _a : _b); \
})
/* evaluates to (void) if _A or _B are not constant or of different types */
#define NM_CONST_MAX(_A, _B) \
(__builtin_choose_expr((__builtin_constant_p(_A) && __builtin_constant_p(_B) \
&& __builtin_types_compatible_p(typeof(_A), typeof(_B))), \
((_A) > (_B)) ? (_A) : (_B), \
((void) 0)))
/* Determine whether @x is a power of two (@x being an integer type).
* Basically, this returns TRUE, if @x has exactly one bit set.
* For negative values and zero, this always returns FALSE. */