[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Avoid some C++ comparisons of SCM values
From: |
David Kastrup |
Subject: |
[PATCH] Avoid some C++ comparisons of SCM values |
Date: |
Wed, 20 Apr 2016 14:54:21 +0200 |
---
lily/axis-group-interface.cc | 2 +-
lily/output-def-scheme.cc | 4 ++--
lily/scheme-engraver.cc | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc
index 5252028..38a193c 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 e78eff0..911d17a 100644
--- a/lily/output-def-scheme.cc
+++ b/lily/output-def-scheme.cc
@@ -101,7 +101,7 @@ 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 ())
+ 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)));
diff --git a/lily/scheme-engraver.cc b/lily/scheme-engraver.cc
index ec41976..6161a07 100644
--- a/lily/scheme-engraver.cc
+++ b/lily/scheme-engraver.cc
@@ -168,7 +168,7 @@ Scheme_engraver::get_listener_list () const
void \
Scheme_engraver::what () \
{ \
- if (what ## _function_ != SCM_BOOL_F) \
+ if (scm_is_true (what ## _function_)) \
scm_call_1 (what ## _function_, self_scm ()); \
}
--
2.7.4
- [PATCH] Avoid some C++ comparisons of SCM values,
David Kastrup <=