]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
send_stream_event(...); macro should only produce one statement
[lilypond.git] / lily / all-font-metrics.cc
index 31e8fbb619ed57b36f93ef91c32836e17588f61a..13542022c33fc6a5f2f9ab7970fad638e11e876f 100644 (file)
@@ -27,6 +27,8 @@
 #include "scm-hash.hh"
 #include "warn.hh"
 
+using std::string;
+
 Index_to_charcode_map const *
 All_font_metrics::get_index_to_charcode_map (const string &filename,
                                              int face_index,
@@ -72,7 +74,7 @@ All_font_metrics::~All_font_metrics ()
 }
 
 SCM
-All_font_metrics::mark_smob ()
+All_font_metrics::mark_smob () const
 {
 #if HAVE_PANGO_FT2
   if (pango_dict_)
@@ -113,7 +115,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
                                    scm_from_double (1.0));
     }
   g_free (pango_fn);
-  return derived_unsmob<Pango_font> (val);
+  return unsmob<Pango_font> (val);
 }
 
 #endif
@@ -138,15 +140,15 @@ All_font_metrics::find_otf (const string &name)
 
       debug_output ("]", false);
 
-      Font_metric::unsmob (val)->file_name_ = file_name;
+      unsmob<Font_metric> (val)->file_name_ = file_name;
       SCM name_string = ly_string2scm (name);
-      Font_metric::unsmob (val)->description_ = scm_cons (name_string,
+      unsmob<Font_metric> (val)->description_ = scm_cons (name_string,
                                                      scm_from_double (1.0));
       otf_dict_->set (sname, val);
-      Font_metric::unsmob (val)->unprotect ();
+      unsmob<Font_metric> (val)->unprotect ();
     }
 
-  return derived_unsmob<Open_type_font> (val);
+  return unsmob<Open_type_font> (val);
 }
 
 Font_metric *