[0.4.7][XDK][PSDK][WINE] Unify ARRAY_SIZE definition for Wine modules. CORE-15127

I need this for the following commits to be able to fix more compiler warnings
without having to introduce additional diff for better code from newer branches, that
also uses this macro. The older the branch, the less of duplication we have for this
macro.

picked from 0.4.11-dev-258-g 82faa151e5
This commit is contained in:
Joachim Henze 2022-03-14 09:50:32 +01:00
parent f8eebacfcf
commit df2ae760d1
4 changed files with 4 additions and 6 deletions

View file

@ -48,8 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
#define ULONG64_MAX (~(ULONG64)0)
#define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array))
struct vec4
{
float x, y, z, w;

View file

@ -70,8 +70,6 @@ static const WCHAR updateW[] = {'U','P','D','A','T','E'};
static const WCHAR valuesW[] = {'V','A','L','U','E','S'};
static const WCHAR whereW[] = {'W','H','E','R','E'};
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
/*
** These are the keywords
** They MUST be in alphabetical order

View file

@ -27,8 +27,6 @@
/* not defined in public headers */
DEFINE_GUID(IID_IXmlWriterOutput, 0xc1131708, 0x0f59, 0x477f, 0x93, 0x59, 0x7d, 0x33, 0x24, 0x51, 0xbc, 0x1a);
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
static const WCHAR closeelementW[] = {'<','/'};
static const WCHAR closetagW[] = {' ','/','>'};
static const WCHAR closepiW[] = {'?','>'};

View file

@ -4227,6 +4227,10 @@ typedef struct _TP_CALLBACK_ENVIRON_V1 {
} TP_CALLBACK_ENVIRON_V1, TP_CALLBACK_ENVIRON, *PTP_CALLBACK_ENVIRON;
#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN7) */
#ifdef __WINESRC__
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
#ifdef _MSC_VER
#pragma warning(pop)
#endif