X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faccidental-engraver.cc;h=f9d2e15cd4c0e298f9c6a9fbcb3caea2a93fe172;hb=31ab2644ea8e562db739ae569e069d13c039891d;hp=fcc9fcb97792643723097414cbe6cbdb600ba289;hpb=d2762a4f1add2bb04d6fc34d3c7ae03eeb7d500f;p=lilypond.git diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index fcc9fcb977..f9d2e15cd4 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -199,10 +199,7 @@ check_pitch_against_rules (Pitch const &pitch, Context *origin, */ else if (scm_is_symbol (rule)) { - Context *dad = origin; - while (dad && !dad->is_alias (rule)) - dad = dad->get_parent_context (); - + Context *dad = find_context_above (origin, rule); if (dad) origin = dad; } @@ -233,7 +230,7 @@ Accidental_engraver::process_acknowledged () Stream_event *note = accidentals_[i].melodic_; Context *origin = accidentals_[i].origin_; - Pitch *pitch = Pitch::unsmob (note->get_property ("pitch")); + Pitch *pitch = unsmob (note->get_property ("pitch")); if (!pitch) continue; @@ -317,7 +314,7 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */, */ for (vsize i = 0; i < left_objects_.size (); i++) { - if (left_objects_[i]->get_property ("side-axis") == scm_from_int (X_AXIS)) + if (scm_is_eq (left_objects_[i]->get_property ("side-axis"), scm_from_int (X_AXIS))) Side_position_interface::add_support (left_objects_[i], a); } @@ -332,7 +329,7 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */, Accidental_placement::add_accidental (accidental_placement_, a, - get_property ("accidentalGrouping") == ly_symbol2scm ("voice"), + scm_is_eq (get_property ("accidentalGrouping"), ly_symbol2scm ("voice")), (long) trans); note_head->set_object ("accidental-grob", a->self_scm ()); @@ -348,7 +345,7 @@ Accidental_engraver::make_suggested_accidental (Stream_event * /* note */, Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ()); Side_position_interface::add_support (a, note_head); - if (Grob *stem = Grob::unsmob (a->get_object ("stem"))) + if (Grob *stem = unsmob (a->get_object ("stem"))) Side_position_interface::add_support (a, stem); a->set_parent (note_head, X_AXIS); @@ -372,8 +369,8 @@ Accidental_engraver::stop_translation_timestep () { // Don't mark accidentals as "tied" when the pitch is not // actually the same. This is relevant for enharmonic ties. - Stream_event *le = Stream_event::unsmob (l->get_property ("cause")); - Stream_event *re = Stream_event::unsmob (r->get_property ("cause")); + Stream_event *le = unsmob (l->get_property ("cause")); + Stream_event *re = unsmob (r->get_property ("cause")); if (le && re && !ly_is_equal (le->get_property ("pitch"), re->get_property ("pitch"))) continue; @@ -399,7 +396,7 @@ Accidental_engraver::stop_translation_timestep () int barnum = measure_number (origin); - Pitch *pitch = Pitch::unsmob (note->get_property ("pitch")); + Pitch *pitch = unsmob (note->get_property ("pitch")); if (!pitch) continue; @@ -409,7 +406,7 @@ Accidental_engraver::stop_translation_timestep () SCM key = scm_cons (scm_from_int (o), scm_from_int (n)); Moment end_mp = measure_position (context (), - Duration::unsmob (note->get_property ("duration"))); + unsmob (note->get_property ("duration"))); SCM position = scm_cons (scm_from_int (barnum), end_mp.smobbed_copy ()); SCM localsig = SCM_EOL; @@ -467,7 +464,8 @@ Accidental_engraver::acknowledge_rhythmic_head (Grob_info info) || note->in_event_class ("trill-span-event")) // option to skip accidentals on string harmonics && (to_boolean (get_property ("harmonicAccidentals")) - || info.grob ()->get_property ("style") != ly_symbol2scm ("harmonic")) + || !scm_is_eq (info.grob ()->get_property ("style"), + ly_symbol2scm ("harmonic"))) // ignore accidentals in non-printing voices like NullVoice && !to_boolean (info.context ()->get_property ("nullAccidentals"))) {