projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb3e01c
)
mesa: simplify _mesa_IsVertexArray()
author
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Tue, 20 Jun 2017 13:13:15 +0000
(15:13 +0200)
committer
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Tue, 20 Jun 2017 17:15:17 +0000
(19:15 +0200)
_mesa_lookup_vao() already returns NULL if id is zero.
v2: - change the conditional (Ian)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com> (v1)
src/mesa/main/arrayobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/arrayobj.c
b/src/mesa/main/arrayobj.c
index
82c00fb
..
17a789f
100644
(file)
--- a/
src/mesa/main/arrayobj.c
+++ b/
src/mesa/main/arrayobj.c
@@
-605,14
+605,9
@@
_mesa_IsVertexArray( GLuint id )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (id == 0)
- return GL_FALSE;
-
obj = _mesa_lookup_vao(ctx, id);
- if (obj == NULL)
- return GL_FALSE;
- return obj->EverBound;
+ return obj
!= NULL && obj
->EverBound;
}