]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/request-chord-iterator.cc
release: 1.3.86
[lilypond.git] / lily / request-chord-iterator.cc
index f7ae404b922bacdda23d47989564c2b781f1541f..7f0b00827f96e47beaa47fdb16b964f43d5c8411 100644 (file)
 #include "music-list.hh"
 #include "request.hh"
 
-Request_chord_iterator::Request_chord_iterator ()
-{
-  last_b_ = false;
-}
 
-Request_chord_iterator::Request_chord_iterator (Request_chord_iterator const &src)
-  : Music_iterator (src)
-{
-  last_b_ = src.last_b_;
-  elt_length_mom_ = src.elt_length_mom_;
-}
 
 void
 Request_chord_iterator::construct_children()
@@ -37,6 +27,12 @@ Request_chord_iterator::elt_l () const
   return (Request_chord*) music_l_;
 }
 
+Request_chord_iterator::Request_chord_iterator ()
+{
+  last_b_ = false;
+}
+
+
 bool
 Request_chord_iterator::ok() const
 {
@@ -61,27 +57,12 @@ Request_chord_iterator::do_print() const
 #endif
 }
 
-bool
-Request_chord_iterator::next ()
-{
-  if (first_b_)
-    first_b_ = false;
-  else
-    last_b_ = true;
-  return ok ();
-}
-
 void
 Request_chord_iterator::do_process_and_next (Moment mom)
 {
-#if 0
-  // URG
-  //if (first_b_)
-#else
-  if (ok ())
-#endif
+  if (first_b_)
     {
-      for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list (); gh_pair_p (s);  s = gh_cdr (s))
+      for (SCM s = dynamic_cast<Music_sequence *> (music_l_)->music_list (); gh_pair_p (s);  s = gh_cdr (s))
        {
          Music *mus = unsmob_music (gh_car (s));
          if (Request * req_l = dynamic_cast<Request*> (mus))
@@ -94,12 +75,9 @@ Request_chord_iterator::do_process_and_next (Moment mom)
            mus->origin ()->warning (_f ("Huh?  Not a Request: `%s'",
                                                 classname (mus)));
                    }
+      first_b_ = false;
     }
 
-  next ();
-#if 0
-  // URG
   if (mom >= elt_length_mom_)
     last_b_ = true;
-#endif
 }