]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
release: 1.1.32
[lilypond.git] / lily / note-column.cc
index 826b18a113f61e8506b20db3782c6cff8d637378..770157d0738b4f2c369474758763b5734e4008e2 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "dot-column.hh"
 #include "note-column.hh"
@@ -13,8 +13,6 @@
 #include "rest.hh"
 #include "debug.hh"
 
-
-
 bool
 Note_column::rest_b () const
 {
@@ -49,16 +47,6 @@ Note_column::head_positions_interval() const
   return iv;
 }
 
-/*
-Interval 
-Note_column::do_width () const
-{
-  if (head_l_arr_.size ())
-    return head_l_arr_[0]->extent (X_AXIS);
-  else
-    return Interval (0,0);
-}
-*/
 void
 Note_column::do_pre_processing()
 {
@@ -68,7 +56,7 @@ Note_column::do_pre_processing()
        dir_ = stem_l_->dir_;
       else if (head_l_arr_.size ())
        {
-         assert (false);       // looks obsolete?
+         //      assert (false);       // looks obsolete?
          dir_ = sign (head_positions_interval().center ());
        }
     }
@@ -99,7 +87,7 @@ Note_column::add_script (Script *script_l)
 }
 
 void
-Note_column::do_substitute_dependency (Score_element*o, Score_element*n)
+Note_column::do_substitute_element_pointer (Score_element*o, Score_element*n)
 {
   if (stem_l_ == o) 
     {
@@ -110,7 +98,7 @@ Note_column::do_substitute_dependency (Score_element*o, Score_element*n)
       head_l_arr_.substitute (dynamic_cast<Note_head *> (o), 
                              (n)? dynamic_cast<Note_head *> (n) : 0);
     }
-  Script_column::do_substitute_dependency (o,n);
+  Script_column::do_substitute_element_pointer (o,n);
   if (dynamic_cast<Rest *> (o)) 
     {
       rest_l_arr_.substitute (dynamic_cast<Rest *> (o), 
@@ -121,15 +109,15 @@ Note_column::do_substitute_dependency (Score_element*o, Score_element*n)
 void
 Note_column::add_head (Rhythmic_head *h)
 {
-  if (dynamic_cast<Rest *> (h))
+  if (Rest*r=dynamic_cast<Rest *> (h))
     {
-      rest_l_arr_.push ((Rest*)h);
-      add_support (h);  
+      rest_l_arr_.push (r);
+      add_support (r);  
     }
-  if (dynamic_cast<Note_head *> (h))
+  if (Note_head *nh=dynamic_cast<Note_head *> (h))
     {
-      head_l_arr_.push ((Note_head*) h);
-      add_support (h);
+      head_l_arr_.push (nh);
+      add_support (nh);
     }
 }