X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpure-from-neighbor-interface.cc;h=745c23dbec0d982ab59e1d5d3aec275d0ae86bcd;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=cffe887d1437fd0eb9bc3234eaad0ba286446297;hpb=c054eb280fd9953596eb164f67b0f9d5555c5a32;p=lilypond.git diff --git a/lily/pure-from-neighbor-interface.cc b/lily/pure-from-neighbor-interface.cc index cffe887d14..745c23dbec 100644 --- a/lily/pure-from-neighbor-interface.cc +++ b/lily/pure-from-neighbor-interface.cc @@ -31,7 +31,7 @@ MAKE_SCHEME_CALLBACK (Pure_from_neighbor_interface, calc_pure_relevant_grobs, 1) SCM Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); extract_grob_set ((me->original () && me->original ()->is_live () ? me->original () : me), @@ -41,20 +41,15 @@ Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob) vector new_elts; new_elts.insert (new_elts.end (), elts.begin (), elts.end ()); - SCM neighbors_scm = me->get_object ("neighbors"); - if (Grob_array::is_smob (neighbors_scm)) - { - vector &arr - = Grob_array::unsmob (neighbors_scm)->array_reference (); - arr = new_elts; - } + if (Grob_array *a = unsmob (me->get_object ("neighbors"))) + a->set_array (new_elts); return Axis_group_interface::internal_calc_pure_relevant_grobs (me, "neighbors"); } ADD_INTERFACE (Pure_from_neighbor_interface, - "A collection of routines to allow for objects' pure" - "heights and heights to be calculated based on the" + "A collection of routines to allow for objects' pure " + "heights and heights to be calculated based on the " "heights of the objects' neighbors.", /* properties */