]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
release: 1.1.6
[lilypond.git] / lily / note-column.cc
index 8f700129e5b30f5e36f2c04d016227ad74fbc59b..3894bd6e2bcb81659b3fdebac2b8d388cb28f570 100644 (file)
@@ -13,7 +13,7 @@
 #include "rest.hh"
 #include "debug.hh"
 
-IMPLEMENT_IS_TYPE_B1(Note_column,Script_column);
+
 
 bool
 Note_column::rest_b () const
@@ -102,30 +102,30 @@ Note_column::do_substitute_dependency (Score_element*o, Score_element*n)
 {
   if (stem_l_ == o) 
     {
-      stem_l_ = n ? (Stem*)n->access_Item ():0;
+      stem_l_ = n ? dynamic_cast<Stem *> (n):0;
     }
-  if (o->is_type_b (Note_head::static_name ()))
+  if (dynamic_cast<Note_head *> (o))
     {
-      head_l_arr_.substitute ((Note_head*)o->access_Item (), 
-                             (n)? (Note_head*)n->access_Item () : 0);
+      head_l_arr_.substitute (dynamic_cast<Note_head *> (o), 
+                             (n)? dynamic_cast<Note_head *> (n) : 0);
     }
   Script_column::do_substitute_dependency (o,n);
-  if (o->is_type_b (Rest::static_name ())) 
+  if (dynamic_cast<Rest *> (o)) 
     {
-      rest_l_arr_.substitute ((Rest*)o->access_Item (), 
-                             (n)? (Rest*)n->access_Item () : 0);
+      rest_l_arr_.substitute (dynamic_cast<Rest *> (o), 
+                             (n)? dynamic_cast<Rest *> (n) : 0);
     }
 }
 
 void
 Note_column::add_head (Rhythmic_head *h)
 {
-  if (h->is_type_b (Rest::static_name ()))
+  if (dynamic_cast<Rest *> (h))
     {
       rest_l_arr_.push ((Rest*)h);
       add_support (h);  
     }
-  if (h->is_type_b (Note_head::static_name ()))
+  if (dynamic_cast<Note_head *> (h))
     {
       head_l_arr_.push ((Note_head*) h);
       add_support (h);