summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-03-31 23:06:50 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-03-31 23:06:50 +0000
commit6045b0501d8301a42a76962a1e78fd73bf3027b9 (patch)
tree34c8770f10846c5e74522b29f36b923224c82ca0 /src/mesa/tnl
parent05b26510668fc1e5039c6c9088247f9b3c508cb7 (diff)
minor clean-ups, const qualifiers
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_imm_dlist.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index ff382c27c3..d21527fdb3 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_dlist.c,v 1.48 2003/03/31 18:19:56 brianp Exp $ */
+/* $Id: t_imm_dlist.c,v 1.49 2003/03/31 23:06:50 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -73,13 +73,8 @@ build_normal_lengths( struct immediate *IM )
GLfloat len;
GLfloat (*data)[4] = IM->Attrib[VERT_ATTRIB_NORMAL] + IM->Start;
GLfloat *dest = IM->NormalLengthPtr;
- GLuint *flags = IM->Flag + IM->Start;
- GLuint count = IM->Count - IM->Start;
-
-#if 0
- if (!IM->Attrib[VERT_ATTRIB_NORMAL])
- return;
-#endif
+ const GLuint *flags = IM->Flag + IM->Start;
+ const GLuint count = IM->Count - IM->Start;
if (!dest) {
dest = IM->NormalLengthPtr = (GLfloat *) ALIGN_MALLOC( IMM_SIZE*sizeof(GLfloat), 32 );
@@ -107,11 +102,12 @@ fixup_normal_lengths( struct immediate *IM )
GLfloat len = 1.0F; /* just to silence warnings */
GLfloat (*data)[4] = IM->Attrib[VERT_ATTRIB_NORMAL];
GLfloat *dest = IM->NormalLengthPtr;
- GLuint *flags = IM->Flag;
+ const GLuint *flags = IM->Flag;
for (i = IM->CopyStart ; i <= IM->Start ; i++) {
len = (GLfloat) LEN_3FV( data[i] );
- if (len > 0.0F) len = 1.0F / len;
+ if (len > 0.0F)
+ len = 1.0F / len;
dest[i] = len;
}