Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
de8c478c
Commit
de8c478c
authored
Jul 05, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glu32: Avoid an ARRAY_SIZE-like macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9477a0ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
glu.c
dlls/glu32/glu.c
+3
-4
No files found.
dlls/glu32/glu.c
View file @
de8c478c
...
...
@@ -91,7 +91,6 @@ static const struct { GLuint err; const char *str; } errors[] =
{
GLU_NURBS_ERROR36
,
"null control point reference"
},
{
GLU_NURBS_ERROR37
,
"duplicate point on piecewise linear trimming curve"
},
};
#define NB_ERRORS (sizeof(errors) / sizeof(errors[0]))
typedef
void
(
*
_GLUfuncptr
)(
void
);
...
...
@@ -148,7 +147,7 @@ const GLubyte * WINAPI wine_gluErrorString( GLenum errCode )
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
NB_ERRORS
;
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
errors
)
;
i
++
)
if
(
errors
[
i
].
err
==
errCode
)
return
(
const
GLubyte
*
)
errors
[
i
].
str
;
return
NULL
;
...
...
@@ -159,10 +158,10 @@ const GLubyte * WINAPI wine_gluErrorString( GLenum errCode )
*/
const
WCHAR
*
WINAPI
wine_gluErrorUnicodeStringEXT
(
GLenum
errCode
)
{
static
WCHAR
errorsW
[
NB_ERRORS
][
64
];
static
WCHAR
errorsW
[
ARRAY_SIZE
(
errors
)
][
64
];
unsigned
int
i
,
j
;
for
(
i
=
0
;
i
<
NB_ERRORS
;
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
errors
)
;
i
++
)
{
if
(
errors
[
i
].
err
!=
errCode
)
continue
;
if
(
!
errorsW
[
i
][
0
])
/* errors use only ASCII, do a simple mapping */
...
...
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