From: Han-Wen Nienhuys Date: Fri, 2 May 2008 02:21:12 +0000 (-0300) Subject: Small formatting cleanups. X-Git-Tag: release/2.11.46-1~28^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=494225fd3ef286f1e52d22553fc79c12ee1865a4;p=lilypond.git Small formatting cleanups. --- diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index a5c070398e..80858426bc 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -147,7 +147,6 @@ Arpeggio::brew_chord_slur (SCM smob) * Staff_symbol_referencer::staff_space (me); Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness")); - Real sp = 1.5 * Staff_symbol_referencer::staff_space (me); Real dy = heads.length (); Real height_limit = 1.5; diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 2f66955d44..94057f0bde 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -8,6 +8,7 @@ #include "axis-group-interface.hh" #include "context.hh" +#include "engraver.hh" #include "dimensions.hh" #include "directional-element-interface.hh" #include "engraver.hh" @@ -253,7 +254,7 @@ Dynamic_engraver::process_music () cresc_->set_property ("style", s); context ()->set_property ((start_type + "Spanner").c_str (), SCM_EOL); - s = get_property ((start_type + "Text").c_str ()); + s = get_property ((start_type + "Text").c_str ()); if (Text_interface::is_markup (s)) { cresc_->set_property ("text", s); @@ -277,7 +278,6 @@ Dynamic_engraver::process_music () cresc_->set_bound (LEFT, script_); add_bound_item (line_spanner_, cresc_->get_bound (LEFT)); } - Axis_group_interface::add_element (line_spanner_, cresc_); } } diff --git a/lily/engraver.cc b/lily/engraver.cc index c749be110a..e9195564d7 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -70,7 +70,8 @@ Engraver::announce_end_grob (Grob *e, SCM cause) { cause = m->to_event ()->unprotect (); } - if (unsmob_stream_event (cause) || unsmob_grob (cause)) + if (e->get_property ("cause") == SCM_EOL + && (unsmob_stream_event (cause) || unsmob_grob (cause))) e->set_property ("cause", cause); Grob_info i (this, e); diff --git a/lily/grob.cc b/lily/grob.cc index 78be89e399..9479f17f41 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -722,14 +722,11 @@ common_refpoint_of_list (SCM elist, Grob *common, Axis a) Grob * common_refpoint_of_array (vector const &arr, Grob *common, Axis a) { - for (vsize i = arr.size (); i--;) - if (Grob *s = arr[i]) - { - if (common) - common = common->common_refpoint (s, a); - else - common = s; - } + for (vsize i = 0; i < arr.size (); i++) + if (common) + common = common->common_refpoint (arr[i], a); + else + common = arr[i]; return common; } diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 80f836d5b1..60366a0630 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -47,7 +47,6 @@ Hairpin::consider_suicide (Spanner*me) && ly_is_equal (bounds[RIGHT]->get_column ()->get_property ("when"), bounds[LEFT]->get_property ("when"))) me->suicide (); - } MAKE_SCHEME_CALLBACK (Hairpin, print, 1); @@ -207,7 +206,6 @@ Hairpin::print (SCM smob) /* should do relative to staff-symbol staff-space? */ - Stencil mol; Real x = 0.0; diff --git a/lily/system.cc b/lily/system.cc index f55b2673d1..e686e3b58c 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -394,8 +394,12 @@ System::get_paper_system () Skyline_pair *skylines = Skyline_pair::unsmob (get_property ("vertical-skylines")); if (skylines) { - sys_stencil.add_stencil (Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS)).in_color (255, 0, 0)); - sys_stencil.add_stencil (Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS)).in_color (0, 255, 0)); + Stencil up + = Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS)); + Stencil down + = Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS)); + sys_stencil.add_stencil (up.in_color (255, 0, 0)); + sys_stencil.add_stencil (down.in_color (0, 255, 0)); } }