Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6e7f28d9
Commit
6e7f28d9
authored
Apr 01, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove an ARRAY_SIZE()-like macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aae4f114
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sysparams.c
dlls/user32/sysparams.c
+5
-5
No files found.
dlls/user32/sysparams.c
View file @
6e7f28d9
...
...
@@ -1300,7 +1300,6 @@ static struct sysparam_rgb_entry system_colors[] =
RGB_ENTRY
(
COLOR_MENUBAR
,
RGB
(
212
,
208
,
200
)
)
#undef RGB_ENTRY
};
#define NUM_SYS_COLORS (sizeof(system_colors) / sizeof(system_colors[0]))
/* entries that are initialized by default in the registry */
static
union
sysparam_all_entry
*
const
default_entries
[]
=
...
...
@@ -2690,7 +2689,8 @@ COLORREF WINAPI DECLSPEC_HOTPATCH GetSysColor( INT nIndex )
{
COLORREF
ret
=
0
;
if
(
nIndex
>=
0
&&
nIndex
<
NUM_SYS_COLORS
)
get_entry
(
&
system_colors
[
nIndex
],
0
,
&
ret
);
if
(
nIndex
>=
0
&&
nIndex
<
ARRAY_SIZE
(
system_colors
))
get_entry
(
&
system_colors
[
nIndex
],
0
,
&
ret
);
return
ret
;
}
...
...
@@ -2705,7 +2705,7 @@ BOOL WINAPI SetSysColors( INT count, const INT *colors, const COLORREF *values )
if
(
IS_INTRESOURCE
(
colors
))
return
FALSE
;
/* stupid app passes a color instead of an array */
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
colors
[
i
]
>=
0
&&
colors
[
i
]
<=
NUM_SYS_COLORS
)
if
(
colors
[
i
]
>=
0
&&
colors
[
i
]
<=
ARRAY_SIZE
(
system_colors
)
)
set_entry
(
&
system_colors
[
colors
[
i
]],
values
[
i
],
0
,
0
);
/* Send WM_SYSCOLORCHANGE message to all windows */
...
...
@@ -2735,7 +2735,7 @@ DWORD_PTR WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes
*/
HBRUSH
WINAPI
DECLSPEC_HOTPATCH
GetSysColorBrush
(
INT
index
)
{
if
(
index
<
0
||
index
>=
NUM_SYS_COLORS
)
return
0
;
if
(
index
<
0
||
index
>=
ARRAY_SIZE
(
system_colors
)
)
return
0
;
if
(
!
system_colors
[
index
].
brush
)
{
...
...
@@ -2757,7 +2757,7 @@ HBRUSH WINAPI DECLSPEC_HOTPATCH GetSysColorBrush( INT index )
HPEN
SYSCOLOR_GetPen
(
INT
index
)
{
/* We can assert here, because this function is internal to Wine */
assert
(
0
<=
index
&&
index
<
NUM_SYS_COLORS
);
assert
(
0
<=
index
&&
index
<
ARRAY_SIZE
(
system_colors
)
);
if
(
!
system_colors
[
index
].
pen
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment