]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-engraver.cc
patch::: 1.5.43.jcn2
[lilypond.git] / lily / spacing-engraver.cc
index 874f6b5e048adfa9bdfd1b82e01c11afd621a7ea..00fce0be69a42347482de4f408809c74dbca2efa 100644 (file)
@@ -9,13 +9,12 @@
 
 #include "musical-request.hh"
 #include "paper-column.hh"
-
-#include "spacing-spanner.hh"
 #include "engraver.hh"
 #include "pqueue.hh"
 #include "note-spacing.hh"
 #include "staff-spacing.hh"
 #include "group-interface.hh"
+#include "spanner.hh"
 
 struct Rhythmic_tuple
 {
@@ -78,7 +77,6 @@ void
 Spacing_engraver::initialize ()
 {
   spacing_p_  =new Spanner (get_property ("SpacingSpanner"));
-  Spacing_spanner::set_interface (spacing_p_);
   spacing_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));  
   announce_grob(spacing_p_, SCM_EOL);
 }
@@ -124,16 +122,17 @@ Spacing_engraver::stop_translation_timestep ()
        }
     }
   
-  Moment starter, inf;
-  inf.set_infinite (1);
-  starter=inf;
+  Moment starter;
+  starter.set_infinite (1);
+
   for (int i=0; i < now_durations_.size (); i++)
     {
       Moment m = now_durations_[i].info_.music_cause ()->length_mom ();
       if (m.to_bool ())
-       starter = starter <? m;
-
-      playing_durations_.insert (now_durations_[i]);
+       {
+         starter = starter <? m;
+         playing_durations_.insert (now_durations_[i]);
+       }
     }
   now_durations_.clear ();
   
@@ -142,6 +141,7 @@ Spacing_engraver::stop_translation_timestep ()
   Paper_column * sc
     = dynamic_cast<Paper_column*> (unsmob_grob (get_property ("currentMusicalColumn")));
 
+  assert (starter.to_bool ());
   SCM sh = shortest_playing.smobbed_copy ();
   SCM st = starter.smobbed_copy ();