]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-select.cc
Issue 4365: non-member unsmob<T> replaces T::unsmob and T::is_smob
[lilypond.git] / lily / font-select.cc
index 6532a7c2869f6b259dbb0e52535a0e6c3e896042..b38ff9268a29ba41e0d284386819c260db6e1971 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2003--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2003--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -40,9 +40,9 @@ get_font_by_design_size (Output_def *layout, Real requested,
     {
       SCM entry = scm_c_vector_ref (font_vector, i);
 
-      if (scm_promise_p (entry) == SCM_BOOL_T)
+      if (to_boolean (scm_promise_p (entry)))
         {
-          Font_metric *fm = unsmob_metrics (scm_force (entry));
+          Font_metric *fm = unsmob<Font_metric> (scm_force (entry));
           size = fm->design_size ();
         }
 #if HAVE_PANGO_FT2
@@ -86,7 +86,7 @@ get_font_by_design_size (Output_def *layout, Real requested,
 #endif
     }
   else
-    fm = unsmob_metrics (scm_force (scm_c_vector_ref (font_vector, i)));
+    fm = unsmob<Font_metric> (scm_force (scm_c_vector_ref (font_vector, i)));
 
   return find_scaled_font (layout, fm, requested / size);
 }