Commit 84f22492 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winhlp32: Avoid an ARRAY_SIZE-like macro.

parent 038d9e8a
...@@ -66,19 +66,18 @@ static void WINHELP_InitFonts(HWND hWnd) ...@@ -66,19 +66,18 @@ static void WINHELP_InitFonts(HWND hWnd)
{-12, 0, 0, 0, 700, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}}, {-12, 0, 0, 0, 700, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}},
{-10, 0, 0, 0, 700, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}}, {-10, 0, 0, 0, 700, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}},
{ -8, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}}}; { -8, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, {'H','e','l','v',0}}};
#define FONTS_LEN (sizeof(logfontlist)/sizeof(*logfontlist))
static HFONT fonts[FONTS_LEN]; static HFONT fonts[ARRAY_SIZE(logfontlist)];
static BOOL init = FALSE; static BOOL init = FALSE;
win->fonts_len = FONTS_LEN; win->fonts_len = ARRAY_SIZE(logfontlist);
win->fonts = fonts; win->fonts = fonts;
if (!init) if (!init)
{ {
UINT i; UINT i;
for (i = 0; i < FONTS_LEN; i++) for (i = 0; i < ARRAY_SIZE(logfontlist); i++)
{ {
fonts[i] = CreateFontIndirectW(&logfontlist[i]); fonts[i] = CreateFontIndirectW(&logfontlist[i]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment