]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
Issue 4377: Run a script for using derived_unsmob where obvious
[lilypond.git] / lily / all-font-metrics.cc
index c39cee79d35c686ad9c1f3e70168d2feda3ad061..bc8ba15dae43fcd93f8e81fe9bdfe4c15b4ca04d 100644 (file)
@@ -103,7 +103,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
                                    scm_from_double (1.0));
     }
   g_free (pango_fn);
-  return dynamic_cast<Pango_font *> (Font_metric::unsmob (val));
+  return derived_unsmob<Pango_font> (val);
 }
 
 #endif
@@ -136,7 +136,7 @@ All_font_metrics::find_otf (const string &name)
       Font_metric::unsmob (val)->unprotect ();
     }
 
-  return dynamic_cast<Open_type_font *> (Font_metric::unsmob (val));
+  return derived_unsmob<Open_type_font> (val);
 }
 
 Font_metric *