]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper-iterator.cc
Merge with git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond.git
[lilypond.git] / lily / music-wrapper-iterator.cc
index e20a6261f5692e60d18fdc6624834c089a4a8277..c50a64c7c10f97082658bdaff72fada615b789b1 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "music-wrapper-iterator.hh"
@@ -37,8 +37,9 @@ Music_wrapper_iterator::derived_substitute (Context *f, Context *t)
 void
 Music_wrapper_iterator::construct_children ()
 {
-  Music *m = dynamic_cast<Music_wrapper const *> (get_music ())->element ();
-  child_iter_ = unsmob_iterator (get_iterator (m));
+  Music *my_music = get_music ();
+  Music *child = unsmob_music (my_music->get_property ("element"));
+  child_iter_ = unsmob_iterator (get_iterator (child));
 }
 
 bool
@@ -59,12 +60,6 @@ Music_wrapper_iterator::pending_moment () const
   return child_iter_->pending_moment ();
 }
 
-Music_iterator *
-Music_wrapper_iterator::try_music_in_children (Music *m) const
-{
-  return child_iter_->try_music (m);
-}
-
 IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator);
 
 bool