]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spanner.cc
* scripts/musicxml2ly.py (convert): add \version
[lilypond.git] / lily / spanner.cc
index 590c4d9473678009630ea353dc503f99632daa22..8db59844f85a4926162661577778370563049d7d 100644 (file)
@@ -3,12 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "spanner.hh"
 
-#include <math.h>
 
 #include "pointer-group-interface.hh"
 #include "libc-extension.hh"
@@ -81,7 +80,8 @@ Spanner::do_break_processing ()
     }
   else
     {
-      Link_array<Item> break_points = pscore_->root_system ()->broken_col_range (left, right);
+      System *root  = get_root_system (this);
+      Link_array<Item> break_points = root->broken_col_range (left, right);
 
       break_points.insert (left, 0);
       break_points.push (right);
@@ -185,9 +185,7 @@ Spanner::set_bound (Direction d, Grob *s)
      We check for System to prevent the column -> line_of_score
      -> column -> line_of_score -> etc situation */
   if (d == LEFT && !dynamic_cast<System *> (this))
-    {
-      set_parent (i, X_AXIS);
-    }
+    set_parent (i, X_AXIS);
 
   /*
     Signal that this column needs to be kept alive. They need to be
@@ -198,9 +196,7 @@ Spanner::set_bound (Direction d, Grob *s)
 
   */
   if (dynamic_cast<Paper_column *> (i))
-    {
-      Pointer_group_interface::add_grob (i, ly_symbol2scm ("bounded-by-me"), this);
-    }
+    Pointer_group_interface::add_grob (i, ly_symbol2scm ("bounded-by-me"), this);
 }
 
 Spanner::Spanner (SCM s, Object_key const *key)
@@ -253,7 +249,7 @@ Spanner::find_broken_piece (System *l) const
 int
 Spanner::compare (Spanner *const &p1, Spanner *const &p2)
 {
-  return p1->get_system ()->get_rank() - p2->get_system ()->get_rank();
+  return p1->get_system ()->get_rank () - p2->get_system ()->get_rank ();
 }
 
 bool
@@ -335,12 +331,12 @@ Spanner::set_spacing_rods (SCM smob)
 }
 
 /*
-  Return I such that SP == SP->ORIGINAL_->BROKEN_INTOS_[I].
+  Return I such that SP == SP->ORIGINAL ()->BROKEN_INTOS_[I].
 */
 int
 broken_spanner_index (Spanner *sp)
 {
-  Spanner *parent = dynamic_cast<Spanner *> (sp->original_);
+  Spanner *parent = dynamic_cast<Spanner *> (sp->original ());
   return parent->broken_intos_.find_index (sp);
 }