]> granicus.if.org Git - libass/commitdiff
Avoid unnecessary conditional and initializations
authorGrigori Goronzy <greg@blackbox>
Wed, 14 Jul 2010 13:17:34 +0000 (15:17 +0200)
committerGrigori Goronzy <greg@blackbox>
Wed, 14 Jul 2010 13:17:34 +0000 (15:17 +0200)
libass/ass_render.c

index 4e269d4920a6666992cbfbdafaba5ad5d4673f39..75d5e7ad9e1c8d30216985251a39c49e0d2ba898 100644 (file)
@@ -1040,8 +1040,7 @@ get_outline_glyph(ASS_Renderer *render_priv, int symbol, GlyphInfo *info,
     val = cache_find_glyph(render_priv->cache.glyph_cache, &key);
     if (val) {
         info->glyph = val->glyph;
-        if (val->outline_glyph)
-            info->outline_glyph = val->outline_glyph;
+        info->outline_glyph = val->outline_glyph;
         info->bbox = val->bbox_scaled;
         info->advance.x = val->advance.x;
         info->advance.y = val->advance.y;
@@ -1136,8 +1135,8 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info)
         info->bm = info->bm_o = info->bm_s = 0;
         if (info->glyph && info->symbol != '\n' && info->symbol != 0
             && !info->skip) {
-            FT_Glyph glyph = info->glyph;
-            FT_Glyph outline = info->outline_glyph;
+            FT_Glyph glyph;
+            FT_Glyph outline;
             FT_Glyph_Copy(info->glyph, &glyph);
             FT_Glyph_Copy(info->outline_glyph, &outline);
             // calculating rotation shift vector (from rotation origin to the glyph basepoint)