diff options
author | Keith Whitwell <[email protected]> | 2008-03-23 18:21:00 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-03-23 18:21:00 +0000 |
commit | 301b187ca9a811b608894d20bab934af0a10b8ab (patch) | |
tree | a2721ffcfcfcd79e2e69515c369b252b16d9ae15 /src/gallium/auxiliary/draw/draw_pt_elts.c | |
parent | f40357e25c0520ef1d64ffab03501da4c8b93529 (diff) |
draw: fix some unsigned vs ushort confusion
Middle-end elements are ushort, but prior to that have to treat all
elements as unsigned to avoid wrapping and/or overruns.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_elts.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_elts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_elts.c b/src/gallium/auxiliary/draw/draw_pt_elts.c index 585b83fa903..f337f71ea0e 100644 --- a/src/gallium/auxiliary/draw/draw_pt_elts.c +++ b/src/gallium/auxiliary/draw/draw_pt_elts.c @@ -37,22 +37,22 @@ * the start value into a pointer.
*/
-static ushort elt_uint( const void *elts, ushort idx )
+static unsigned elt_uint( const void *elts, unsigned idx )
{
return *(((const uint *)elts) + idx);
}
-static ushort elt_ushort( const void *elts, ushort idx )
+static unsigned elt_ushort( const void *elts, unsigned idx )
{
return *(((const ushort *)elts) + idx);
}
-static ushort elt_ubyte( const void *elts, ushort idx )
+static unsigned elt_ubyte( const void *elts, unsigned idx )
{
return *(((const ubyte *)elts) + idx);
}
-static ushort elt_vert( const void *elts, ushort idx )
+static unsigned elt_vert( const void *elts, unsigned idx )
{
return (const ubyte *)elts - (const ubyte *)NULL + idx;
}
|