diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 10:00:53 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 10:00:53 +0000 |
commit | d96c2d51d976c011e9758b4929916f7a3c0179c6 (patch) | |
tree | 2e999f38362753ba37aff3557e9a5cd2e69fc675 /libass | |
parent | df5bbaa735faf49ecc72eeb8891724cda0e17334 (diff) | |
download | mpv-d96c2d51d976c011e9758b4929916f7a3c0179c6.tar.bz2 mpv-d96c2d51d976c011e9758b4929916f7a3c0179c6.tar.xz |
A function always returning 0 could as well return void.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22475 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index c240e657d6..1fb35c76f1 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1226,7 +1226,7 @@ static void free_render_context(void) * \param advance advance vector of the extracted glyph * \return 0 on success */ -static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) +static void get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) { int error; glyph_hash_val_t* val; @@ -1258,7 +1258,7 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) info->advance.x = val->advance.x; info->advance.y = val->advance.y; - return 0; + return; } // not found, get a new outline glyph from face @@ -1270,7 +1270,7 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol); if (!info->glyph) - return 0; + return; info->advance.x = d16_to_d6(info->glyph->advance.x); info->advance.y = d16_to_d6(info->glyph->advance.y); @@ -1282,8 +1282,6 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance) mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FT_Glyph_Stroke_Error, error); } } - - return 0; } /** @@ -1651,7 +1649,6 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images) FT_UInt previous; FT_UInt num_glyphs; FT_Vector pen; - int error; unsigned code; FT_BBox bbox; int i, j; @@ -1719,11 +1716,7 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images) ass_font_set_transform(render_context.font, &matrix, &shift ); } - error = get_glyph(code, text_info.glyphs + text_info.length, &shift); - - if (error) { - continue; - } + get_glyph(code, text_info.glyphs + text_info.length, &shift); text_info.glyphs[text_info.length].pos.x = pen.x >> 6; text_info.glyphs[text_info.length].pos.y = pen.y >> 6; |