]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spanner.cc
release: 1.1.29
[lilypond.git] / lily / spanner.cc
index 28f49f22af124915f3ed6e5def5c4cfaea3c2824..cf4932b47f2acc7a3da40fe81ce854dab75cc398 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
@@ -133,15 +133,14 @@ Spanner::Spanner (Spanner const &s)
 }
 
 void
-Spanner::do_brew_molecule () 
+Spanner::output_processing () 
 {
   if (transparent_b_)
     return ;
-  Molecule *output= brew_molecule_p ();
+  output_p_ = do_brew_molecule_p ();
   Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
   Offset o = absolute_offset() + left_off;
-  pscore_l_->outputter_l_->output_molecule (output, o, classname (this));
-  delete output;
+  pscore_l_->outputter_l_->output_molecule (output_p_, o, classname (this));
 }
 
 Interval
@@ -149,7 +148,9 @@ Spanner::do_width() const
 {
   Real l = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
   Real r = spanned_drul_[RIGHT]->absolute_coordinate (X_AXIS);
-  assert (r>=l);
+
+  if (r< l)
+    warning ("Spanner with negative length");
        
   return Interval (0, r-l);
 }