opengl32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f10136a9e3
commit
54960cd825
|
@ -525,7 +525,7 @@ static void test_colorbits(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_COLOR_BITS_ARB, WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB,
|
const int iAttribList[] = { WGL_COLOR_BITS_ARB, WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB,
|
||||||
WGL_BLUE_BITS_ARB, WGL_ALPHA_BITS_ARB };
|
WGL_BLUE_BITS_ARB, WGL_ALPHA_BITS_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
const int iAttribs[] = { WGL_ALPHA_BITS_ARB, 1, 0 };
|
const int iAttribs[] = { WGL_ALPHA_BITS_ARB, 1, 0 };
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
@ -545,8 +545,8 @@ static void test_colorbits(HDC hdc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList), iAttribList,
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList, iAttribRet);
|
iAttribRet);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
{
|
{
|
||||||
skip("wglGetPixelFormatAttribivARB failed\n");
|
skip("wglGetPixelFormatAttribivARB failed\n");
|
||||||
|
@ -560,7 +560,7 @@ static void test_colorbits(HDC hdc)
|
||||||
static void test_gdi_dbuf(HDC hdc)
|
static void test_gdi_dbuf(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB };
|
const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
int iPixelFormat;
|
int iPixelFormat;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
@ -574,9 +574,8 @@ static void test_gdi_dbuf(HDC hdc)
|
||||||
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
||||||
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
|
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
|
||||||
{
|
{
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList),
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList,
|
iAttribList, iAttribRet);
|
||||||
iAttribRet);
|
|
||||||
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
continue;
|
continue;
|
||||||
|
@ -588,7 +587,7 @@ static void test_gdi_dbuf(HDC hdc)
|
||||||
static void test_acceleration(HDC hdc)
|
static void test_acceleration(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_ACCELERATION_ARB };
|
const int iAttribList[] = { WGL_ACCELERATION_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
int iPixelFormat;
|
int iPixelFormat;
|
||||||
int res;
|
int res;
|
||||||
|
@ -603,9 +602,8 @@ static void test_acceleration(HDC hdc)
|
||||||
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
||||||
for(iPixelFormat = 1; iPixelFormat <= nFormats; iPixelFormat++)
|
for(iPixelFormat = 1; iPixelFormat <= nFormats; iPixelFormat++)
|
||||||
{
|
{
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList),
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList,
|
iAttribList, iAttribRet);
|
||||||
iAttribRet);
|
|
||||||
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue