]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/request-chord.cc
* lily/musical-request.cc (music-duration-length,
[lilypond.git] / lily / request-chord.cc
index 7d9cb184f4d346f3fac339642746cb218f183672..2cf46c91cdd71afa7fc670858c39013df8934a5c 100644 (file)
@@ -13,14 +13,9 @@ Request_chord::to_relative_octave (Pitch last)
   for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
-      Melodic_req *m= dynamic_cast <Melodic_req *> (mus);
 
-      /*
-       kLudge: rests have pitches now as well.
-       */
-      Rest_req *r = dynamic_cast<Rest_req*> (mus);
-      
-      if (r || m)
+      if (mus->is_mus_type ("melodic-event")
+         || mus->is_mus_type ("rest-event"))
        {
          Pitch *old_pit = unsmob_pitch (mus->get_mus_property ("pitch"));
          if (!old_pit)