summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2021-09-01 13:55:06 +0300
committerOleg Oshmyan <chortos@inbox.lv>2021-09-09 02:32:49 +0300
commite5f19cbb716dd90bf39879c8f44b7702e99455d0 (patch)
tree346b8dfb72565a0f140dbf1d4254f768650dcb3d
parent8ed2a2f033207a5611691710e58a297f70410c50 (diff)
downloadlibass-e5f19cbb716dd90bf39879c8f44b7702e99455d0.tar.bz2
libass-e5f19cbb716dd90bf39879c8f44b7702e99455d0.tar.xz
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.
-rw-r--r--libass/ass_font.c7
1 files changed, 0 insertions, 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));