From 559d071f8d6de1af01dbfe20b324f060ddce604d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 30 Oct 2023 08:25:17 +0100 Subject: [PATCH] std-aux: remove NM_CONST_MAX() We now can use either NM_MAX() or NM_MAX_CONST() instead. Drop this. --- src/libnm-std-aux/nm-std-aux.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h index 819f3284c..3b39a0194 100644 --- a/src/libnm-std-aux/nm-std-aux.h +++ b/src/libnm-std-aux/nm-std-aux.h @@ -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. */