]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4830: Avoid some C++ comparisons of SCM values
authorDavid Kastrup <dak@gnu.org>
Mon, 18 Apr 2016 18:21:17 +0000 (20:21 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 10 May 2016 18:48:51 +0000 (20:48 +0200)
lily/axis-group-interface.cc
lily/output-def-scheme.cc

index 52520280f2eba2cbe2cf0d9718991c1156df5f4f..38a193caf63dfc4659dc10a1245d2c9ab2785c69 100644 (file)
@@ -81,7 +81,7 @@ Axis_group_interface::has_axis (Grob *me, Axis a)
 {
   SCM axes = me->get_property ("axes");
 
-  return (SCM_BOOL_F != scm_memq (scm_from_int (a), axes));
+  return scm_is_true (scm_memq (scm_from_int (a), axes));
 }
 
 Interval
index e78eff0673375d921eaeeb6cecf3cf0ffcb5f240..921f3dfcd5f9523ccbdbf20f6ffda170bb4152ed 100644 (file)
@@ -101,8 +101,8 @@ LY_DEFINE (ly_output_description, "ly:output-description",
     {
       Context_def *td = unsmob<Context_def> (scm_cdar (s));
       SCM key = scm_caar (s);
-      if (td && key == td->get_context_name ())
-       ell = scm_cons (scm_cons (key, td->to_alist ()), ell);
+      if (td && scm_is_eq (key, td->get_context_name ()))
+        ell = scm_cons (scm_cons (key, td->to_alist ()), ell);
     }
   return ell;
 }
@@ -195,7 +195,7 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
     }
 
   SCM alist2 = SCM_EOL;
-  if (scm_hash_table_p (tab2) == SCM_BOOL_T)
+  if (scm_is_true (scm_hash_table_p (tab2)))
     {
       // strip original-fonts/pango-font-descriptions
       alist2 = scm_append (ly_alist_vals (ly_hash2alist (tab2)));