forked from minhngoc25a/freetype2
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.
This commit is contained in:
parent
2415cbf365
commit
e0717d4f48
|
@ -1,3 +1,11 @@
|
||||||
|
2010-02-27 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
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 <behdad@behdad.org>
|
2010-02-26 Behdad Esfahbod <behdad@behdad.org>
|
||||||
|
|
||||||
Improve handling of invalid glyph indices in char->index functions.
|
Improve handling of invalid glyph indices in char->index functions.
|
||||||
|
|
|
@ -3113,9 +3113,7 @@
|
||||||
{
|
{
|
||||||
gindex = FT_Get_Char_Index( face, 0 );
|
gindex = FT_Get_Char_Index( face, 0 );
|
||||||
if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
|
if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
|
||||||
do {
|
result = FT_Get_Next_Char( face, 0, &gindex );
|
||||||
result = FT_Get_Next_Char( face, 0, &gindex );
|
|
||||||
} while ( gindex >= (FT_UInt)face->num_glyphs );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( agindex )
|
if ( agindex )
|
||||||
|
|
Loading…
Reference in New Issue