]> git.donarmstrong.com Git - lilypond.git/commitdiff
Small formatting cleanups.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 May 2008 02:21:12 +0000 (23:21 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 May 2008 02:21:12 +0000 (23:21 -0300)
lily/arpeggio.cc
lily/dynamic-engraver.cc
lily/engraver.cc
lily/grob.cc
lily/hairpin.cc
lily/system.cc

index a5c070398e53149b4560753a20626c7cce99665c..80858426bc6eb43bc7f12e2f77a83aec4351d8b3 100644 (file)
@@ -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;
index 2f66955d446317d3ad5682d633b992c579ee0c06..94057f0bde25ebe7ca50288758c73233d4c4f003 100644 (file)
@@ -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_);
        }
     }
index c749be110a169b2319d68059070dbb7f5f2bf1de..e9195564d79849deee822a51933b932948a720af 100644 (file)
@@ -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);
index 78be89e399f147c6cefb42428e7896bd204308c9..9479f17f41179cb3fbdc3cf6769fb533ffbbde9a 100644 (file)
@@ -722,14 +722,11 @@ common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 Grob *
 common_refpoint_of_array (vector<Grob*> 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;
 }
index 80f836d5b1ff89f74c0d84aab425183f8b899141..60366a0630fa7ee51dab702fe2444b6df12cb1f1 100644 (file)
@@ -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;
 
index f55b2673d1f54836dc82adf8bdde7ea6f33629bf..e686e3b58cad0585e3ea7303686e50bfeb5e13aa 100644 (file)
@@ -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));
        }
     }