From e5f19cbb716dd90bf39879c8f44b7702e99455d0 Mon Sep 17 00:00:00 2001 From: Oleg Oshmyan Date: Wed, 1 Sep 2021 13:55:06 +0300 Subject: font: remove misleading no-op code ass_font_get_index is _always_ called with *face_index == 0, and even then it's only a fallback default rather than a request: it should be treated as an output-only parameter. --- libass/ass_font.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libass/ass_font.c b/libass/ass_font.c index e4ce62b..221a7b4 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -486,13 +486,6 @@ int ass_font_get_index(ASS_FontSelector *fontsel, ASS_Font *font, return 0; } - // try with the requested face - if (*face_index < font->n_faces) { - face = font->faces[*face_index]; - index = FT_Get_Char_Index(face, ass_font_index_magic(face, symbol)); - } - - // not found in requested face, try all others for (i = 0; i < font->n_faces && index == 0; ++i) { face = font->faces[i]; index = FT_Get_Char_Index(face, ass_font_index_magic(face, symbol)); -- cgit v1.2.3