]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dot-column.cc
release: 1.1.1
[lilypond.git] / lily / dot-column.cc
index cee8a3edec21470a64a8d467b31b5d3faae9976b..284b746cc946841ec581cc52cbd3ccdc92f47ddb 100644 (file)
@@ -33,12 +33,13 @@ void
 Dot_column::do_substitute_dependency (Score_element*o,Score_element*n)
 {
   Item *oi =dynamic_cast <Item *> (o);
-  Item *ni = n?dynamic_cast <Item *> (n):0;
   
-  if (oi&&oi->is_type_b (Rhythmic_head::static_name ()))
-    head_l_arr_.substitute ((Rhythmic_head*)oi, (Rhythmic_head*)ni);
-  else if (oi && oi->is_type_b (Dots::static_name ()))
-    dot_l_arr_.substitute ((Dots*) oi, (Dots*) ni);
+  if (oi && dynamic_cast<Rhythmic_head *> (oi))
+    head_l_arr_.substitute (dynamic_cast<Rhythmic_head*> (oi),
+                           dynamic_cast<Rhythmic_head*>(n));
+  else if (oi && dynamic_cast<Dots *> (oi))
+    dot_l_arr_.substitute (dynamic_cast<Dots*> (oi),
+                          dynamic_cast<Dots*> (n));
 }
 
 void