diff options
author | Carl Worth <cworth@cworth.org> | 2007-07-30 15:10:11 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-08-02 22:49:56 -0700 |
commit | 363d764ea32b938f3dff35df7cf3370363c04d5c (patch) | |
tree | a391679c3a982b82dbc638b295d9e7c45bebc93c /render | |
parent | dc8a528cd6b9a4da3e60fa31428c37f5b34a897f (diff) |
ProcRenderAddGlyphs: Take advantage of the for loops to simplify the code a bit
Diffstat (limited to 'render')
-rw-r--r-- | render/render.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/render/render.c b/render/render.c index d311fb383..10a5b805c 100644 --- a/render/render.c +++ b/render/render.c @@ -1134,7 +1134,7 @@ ProcRenderAddGlyphs (ClientPtr client) remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; for (i = 0; i < nglyphs; i++) { - glyph = AllocateGlyph (gi, glyphSet->fdepth); + glyph = AllocateGlyph (&gi[i], glyphSet->fdepth); if (!glyph) { err = BadAlloc; @@ -1142,7 +1142,7 @@ ProcRenderAddGlyphs (ClientPtr client) } glyphs->glyph = glyph; - glyphs->id = *gids; + glyphs->id = gids[i]; size = glyph->size - sizeof (xGlyphInfo); if (remain < size) @@ -1153,8 +1153,6 @@ ProcRenderAddGlyphs (ClientPtr client) size += 4 - (size & 3); bits += size; remain -= size; - gi++; - gids++; glyphs++; } if (remain || i < nglyphs) @@ -1168,10 +1166,8 @@ ProcRenderAddGlyphs (ClientPtr client) goto bail; } glyphs = glyphsBase; - for (i = 0; i < nglyphs; i++) { - AddGlyph (glyphSet, glyphs->glyph, glyphs->id); - glyphs++; - } + for (i = 0; i < nglyphs; i++) + AddGlyph (glyphSet, glyphs[i].glyph, glyphs[i].id); if (glyphsBase != glyphsLocal) Xfree (glyphsBase); |