]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/plet-spanner.cc
release: 1.1.0
[lilypond.git] / lily / plet-spanner.cc
index cf257987812f4cea6dcd800ea6b4ec7741099f77..4a032ffc72354c5b418b4541b830d7467e456dad 100644 (file)
@@ -119,7 +119,9 @@ Plet_spanner::do_post_processing ()
   do {
     if (stem_l_drul_[d]->empty_b ())
       {
-       dy_f_drul_[d] = dy_f_drul_[flip (&d)]; // ughugh \[/3 r8 c8 r8 \]/1
+        Direction u = d;
+       flip (&u);
+       dy_f_drul_[d] = dy_f_drul_[u]; // ughugh \[/3 r8 c8 r8 \]/1
       }
     }
   while (flip(&d) != LEFT);
@@ -128,10 +130,10 @@ Plet_spanner::do_post_processing ()
 void
 Plet_spanner::do_substitute_dependency (Score_element* o, Score_element* n)
 {
-  Stem* new_l = n ? (Stem*)n->access_Item () : 0;
-  if (o->access_Item () == stem_l_drul_[LEFT])
+  Stem* new_l = n ? (Stem*)dynamic_cast <Item *> (n) : 0;
+  if (dynamic_cast <Item *> (o) == stem_l_drul_[LEFT])
     stem_l_drul_[LEFT] = new_l;
-  else if (o->access_Item () == stem_l_drul_[RIGHT])
+  else if (dynamic_cast <Item *> (o) == stem_l_drul_[RIGHT])
     stem_l_drul_[RIGHT] = new_l;
 }