Those should not affect any output.
Accidental_engraver::process_music ()
{
SCM sig = get_property ("keyAlterations");
- if (last_keysig_ != sig)
+ if (!scm_is_eq (last_keysig_, sig))
update_local_key_signature (sig);
}
{
LY_ASSERT_SMOB (Book, book, 1);
Book *b = unsmob<Book> (book);
- return b->header_ ? b->header_ : SCM_BOOL_F;
+ return ly_is_module (b->header_) ? b->header_ : SCM_BOOL_F;
}
LY_DEFINE (ly_book_set_header_x, "ly:book-set-header!",
for (vsize i = writable_elts.size (); i--;)
{
Grob *g = writable_elts[i];
- if (g && sym == g->get_property ("break-align-symbol"))
+ if (g && scm_is_eq (sym, g->get_property ("break-align-symbol")))
{
new_elts.push_back (g);
writable_elts.erase (writable_elts.begin () + i);
SCM sym = scm_car (symbol_list);
for (vsize i = 0; i < elements.size (); i++)
{
- if (elements[i]->get_property ("break-align-symbol") == sym)
+ if (scm_is_eq (sym, elements[i]->get_property ("break-align-symbol")))
{
if (Item::break_visible (elements[i])
+ // TODO SCM: simplify syntax?
&& !elements[i]->extent (elements[i], X_AXIS).is_empty ())
{
break_aligned_grob = i;
busy = scm_cdr (busy);
}
- if (start_busy != busy)
+ if (!scm_is_eq (start_busy, busy))
context ()->set_property ("busyGrobs", busy);
}
Key_engraver::process_music ()
{
if (key_event_
- || get_property ("lastKeyAlterations") != get_property ("keyAlterations"))
+ || !scm_is_eq (get_property ("lastKeyAlterations"),
+ get_property ("keyAlterations")))
create_key (false);
}
&& scm_is_pair (val))
new_val = ly_transpose_key_alist (val, delta.smobbed_copy ());
- if (val != new_val)
+ if (!scm_is_eq (val, new_val))
scm_set_cdr_x (entry, new_val);
}
}
Ottava_spanner_engraver::process_music ()
{
SCM ott = get_property ("ottavation");
- if (ott != last_ottavation_)
+ if (!scm_is_eq (ott, last_ottavation_))
{
finished_ = span_;
span_ = 0;
SCM lines = scm_caar (s);
SCM config = scm_cdar (s);
- bool bookpart_last_page = (s == systems_configs_fncounts);
+ bool bookpart_last_page = scm_is_eq (s, systems_configs_fncounts);
SCM page = draw_page (lines, config, page_num, bookpart_last_page);
/* collect labels */
SCM page_num_scm = scm_from_int (page_num);
bool last = (j == cols.size () - 1);
bool break_point = is_break && is_break (cols[j]);
- bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym;
+ bool chunk_end = scm_is_eq (cols[j]->get_property ("page-break-permission"), force_sym);
Break_position cur_pos = Break_position (i,
line_breaker_columns.size (),
cols[j],
for (SCM s = systems; scm_is_pair (s); s = scm_cdr (s))
{
- bool first = (s == systems);
+ bool first = scm_is_eq (s, systems);
if (Grob *g = unsmob<Grob> (scm_car (s)))
{
SCM footnotes = get_footnotes (unsmob<Stencil> (t)->expr ());
ps->set_property ("footnotes", footnotes);
ps->set_property ("is-title", SCM_BOOL_T);
- if (list == texts)
+ if (scm_is_eq (list, texts))
first = ps;
else
{
extract_grob_set (me, "elements", elts);
for (vsize i = 0; i < elts.size (); i++)
{
- if (elts[i]->get_property ("break-align-symbol") == align_sym
+ if (scm_is_eq (align_sym, elts[i]->get_property ("break-align-symbol"))
+ // TODO SCM: there must be a simpler way to put this.
&& !elts[i]->extent (elts[i], X_AXIS).is_empty ())
{
align = elts[i];
| context_def_mod embedded_scm
{
if (!scm_is_string ($2)
- && ly_symbol2scm ("consists") != $1
- && ly_symbol2scm ("remove") != $1)
+ && !scm_is_eq ($1, ly_symbol2scm ("consists"))
+ && !scm_is_eq ($1, ly_symbol2scm ("remove")))
{
$$ = SCM_EOL;
parser->parser_error (@1, _ ("only \\consists and \\remove take non-string argument."));
"Is @var{obj} the specified prob-type?")
{
Prob *prob = unsmob<Prob> (obj);
- return scm_from_bool (prob && prob->type () == type);
+ return scm_from_bool (prob && scm_is_eq (prob->type (), type));
}
LY_DEFINE (ly_make_prob, "ly:make-prob",
{
affect_all_grobs.push_back (sc);
}
- else if (sc->get_property_data ("Y-offset")
- != Side_position_interface::y_aligned_side_proc)
+ else if (!scm_is_eq (sc->get_property_data ("Y-offset"),
+ Side_position_interface::y_aligned_side_proc))
{
head_scripts_map[sc->get_parent (Y_AXIS)].push_back (sc);
}
/*
Don't want to consider scripts horizontally next to notes.
*/
- if (sc->get_property_data ("X-offset")
- != Side_position_interface::x_aligned_side_proc)
+ if (!scm_is_eq (sc->get_property_data ("X-offset"),
+ Side_position_interface::x_aligned_side_proc))
staff_sided.push_back (sc);
}
force[b * breaks.size () + c] = infinity_f;
break;
}
- if (end < cols.size () && cols[end].break_permission_ == force_break)
+ if (end < cols.size () && scm_is_eq (cols[end].break_permission_, force_break))
break;
}
}
SCM
Spring::equal_p (SCM a, SCM b)
{
- return a == b ? SCM_BOOL_T : SCM_BOOL_F;
+ // TODO SCM: This could be made simpler.
+ return scm_is_eq (a, b) ? SCM_BOOL_T : SCM_BOOL_F;
}
LY_DEFINE (ly_make_spring, "ly:make-spring",
SCM stanza = get_property ("stanza");
if (Text_interface::is_markup (stanza)
- && stanza != last_stanza_)
+ && !scm_is_eq (stanza, last_stanza_))
{
last_stanza_ = stanza;
return;
SCM fr = get_property ("timeSignatureFraction");
- if (last_time_fraction_ != fr
- && scm_is_pair (fr))
+ if (!scm_is_eq (last_time_fraction_, fr) && scm_is_pair (fr))
{
time_signature_ = make_item ("TimeSignature", time_cause_);
time_signature_->set_property ("fraction", fr);