ref: e0717d4f48377faa0c5a0fdabfe44b632e6d78dd
parent: 2415cbf3655073070dda5329d4d0f05645bd5896
author: Werner Lemberg <[email protected]>
date: Sat Feb 27 03:10:11 EST 2010
Simplify code. Suggested by Behdad. * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we call FT_Get_Next_Char anyway if necessary.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-27 Werner Lemberg <[email protected]>
+
+ Simplify code.
+ Suggested by Behdad.
+
+ * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
+ call FT_Get_Next_Char anyway if necessary.
+
2010-02-26 Behdad Esfahbod <[email protected]>
Improve handling of invalid glyph indices in char->index functions.
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3113,9 +3113,7 @@
{
gindex = FT_Get_Char_Index( face, 0 );
if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
- do {
- result = FT_Get_Next_Char( face, 0, &gindex );
- } while ( gindex >= (FT_UInt)face->num_glyphs );
+ result = FT_Get_Next_Char( face, 0, &gindex );
}
if ( agindex )