From 2e401213cd73c64c932bb8bd131bdc446ba671bf Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 18 Apr 2016 20:21:17 +0200 Subject: [PATCH] Issue 4830: Avoid some C++ comparisons of SCM values --- lily/axis-group-interface.cc | 2 +- lily/output-def-scheme.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 52520280f2..38a193caf6 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -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 diff --git a/lily/output-def-scheme.cc b/lily/output-def-scheme.cc index e78eff0673..921f3dfcd5 100644 --- a/lily/output-def-scheme.cc +++ b/lily/output-def-scheme.cc @@ -101,8 +101,8 @@ LY_DEFINE (ly_output_description, "ly:output-description", { Context_def *td = unsmob (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))); -- 2.39.2