From 1e2b5197ee350a36fbad006f198bbf8e9a5c8e53 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 26 Dec 2024 20:46:23 +0000 Subject: Drop the remaining usage of APT_ARRAY_SIZE That macro is not that useful as it might perhaps once was. Lets prepare dropping it now in favour of more standard ways of working with arrays now. --- apt-pkg/contrib/macros.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index e0c23b99b..807733927 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -17,10 +17,6 @@ #ifndef MACROS_H #define MACROS_H -/* Useful count macro, use on an array of things and it will return the - number of items in the array */ -#define APT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - // Flag Macros #define FLAG(f) (1L << (f)) #define SETFLAG(v,f) ((v) |= FLAG(f)) @@ -141,6 +137,7 @@ AptScopeWrapper(F) -> AptScopeWrapper; #else #define APT_OVERRIDE /* no c++11 standard */ #endif +#define APT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #endif #endif #endif -- cgit v1.2.3-70-g09d2