summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-09-10 20:41:27 +1000
committerTimothy Arceri <[email protected]>2018-09-11 09:26:04 +1000
commit355a5ef7611774adfb537cb4a95317a82108e397 (patch)
treef275cf6dc382699113a00102cb30ed3c073edc0e /src
parent51995f69204e8a751cb1a3e502e013acf7fff031 (diff)
mesa: tidy up init_matrix_stack()
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/matrix.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 83f081e88e5..8065a83705c 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -657,20 +657,16 @@ void _mesa_update_modelview_project( struct gl_context *ctx, GLuint new_state )
* _math_matrix_ctr() for each element to initialize it.
*/
static void
-init_matrix_stack( struct gl_matrix_stack *stack,
- GLuint maxDepth, GLuint dirtyFlag )
+init_matrix_stack(struct gl_matrix_stack *stack,
+ GLuint maxDepth, GLuint dirtyFlag)
{
- GLuint i;
-
stack->Depth = 0;
stack->MaxDepth = maxDepth;
stack->DirtyFlag = dirtyFlag;
/* The stack will be dynamically resized at glPushMatrix() time */
stack->Stack = calloc(1, sizeof(GLmatrix));
stack->StackSize = 1;
- for (i = 0; i < stack->StackSize; i++) {
- _math_matrix_ctr(&stack->Stack[i]);
- }
+ _math_matrix_ctr(&stack->Stack[0]);
stack->Top = stack->Stack;
}