mesa: code clean-up in _mesa_update_vao_client_arrays()
authorBrian Paul <brianp@vmware.com>
Thu, 20 Oct 2016 00:21:13 +0000 (18:21 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 28 Oct 2016 16:25:30 +0000 (09:25 -0700)
Init vars where declared, use const qualifiers.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/arrayobj.c

index aa425b86567f9f0c27abd892ae63dd2c2748495d..a54889bbe1a0f73bf95a8efd2ceac69eda4a5aad 100644 (file)
@@ -351,14 +351,11 @@ _mesa_update_vao_client_arrays(struct gl_context *ctx,
 
    while (arrays) {
       const int attrib = u_bit_scan64(&arrays);
-
-      struct gl_client_array *client_array;
-      struct gl_array_attributes *attrib_array;
-      struct gl_vertex_buffer_binding *buffer_binding;
-
-      attrib_array = &vao->VertexAttrib[attrib];
-      buffer_binding = &vao->BufferBinding[attrib_array->BufferBindingIndex];
-      client_array = &vao->_VertexAttrib[attrib];
+      struct gl_client_array *client_array = &vao->_VertexAttrib[attrib];
+      const struct gl_array_attributes *attrib_array =
+         &vao->VertexAttrib[attrib];
+      const struct gl_vertex_buffer_binding *buffer_binding =
+         &vao->BufferBinding[attrib_array->BufferBindingIndex];
 
       _mesa_update_client_array(ctx, client_array, attrib_array,
                                 buffer_binding);