diff options
author | Brian Paul <[email protected]> | 2001-03-07 05:06:11 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-07 05:06:11 +0000 |
commit | b51b0a847d7e7daaea69f77ab569086ef81c24a2 (patch) | |
tree | 165cf8b023e6c7b1f66dacc46a6c37110ef27ea7 /src/mesa/swrast_setup | |
parent | 249aebdd357d20f6326137c967c6b3923bef6c05 (diff) |
fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r-- | src/mesa/swrast_setup/ss_context.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_triangle.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index b15d7d98036..6eaeb9c5273 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -1,4 +1,4 @@ -/* $Id: ss_context.c,v 1.11 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: ss_context.c,v 1.12 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -98,7 +98,7 @@ _swsetup_CreateContext( GLcontext *ctx ) if (!swsetup) return GL_FALSE; - swsetup->verts = ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32); + swsetup->verts = (SWvertex *) ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32); if (!swsetup->verts) { FREE(swsetup); return GL_FALSE; diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index 3ed8c97fb6a..2ea04ce0aac 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -236,15 +236,16 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts; - int i; + GLuint i; if (VB->Elts) { - for(i=first;i<last;i++) - if(VB->ClipMask[VB->Elts[i]]==0) + for (i = first; i < last; i++) + if (VB->ClipMask[VB->Elts[i]] == 0) _swrast_Point( ctx, &verts[VB->Elts[i]] ); - } else { - for(i=first;i<last;i++) - if(VB->ClipMask[i]==0) + } + else { + for (i = first; i < last; i++) + if (VB->ClipMask[i] == 0) _swrast_Point( ctx, &verts[i] ); } } |