]> git.donarmstrong.com Git - lilypond.git/commitdiff
(class Quote_iterator): new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 21 Feb 2004 08:20:15 +0000 (08:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 21 Feb 2004 08:20:15 +0000 (08:20 +0000)
lily/quote-iterator.cc

index ed26decf3f6dcc9b5a2aa4aa23b6985a558858cb..680b616fe191fe2557d16b6a95d8b992af50c740 100644 (file)
@@ -114,7 +114,7 @@ Quote_iterator::construct_children ()
 bool
 Quote_iterator::ok () const
 {
-  return (event_idx_ <  end_idx_);
+  return (event_idx_ <= end_idx_);
 }
 
 
@@ -147,26 +147,25 @@ Quote_iterator::process (Moment m)
       event_idx_++;
     }
 
-  if (!gh_pair_p (entry))
-    return;
-  
-  for (SCM s = gh_cdr (entry); gh_pair_p (s); s = gh_cdr (s))
+  if (gh_pair_p (entry))
     {
-      SCM ev_acc = gh_car (s);
+      for (SCM s = gh_cdr (entry); gh_pair_p (s); s = gh_cdr (s))
+       {
+         SCM ev_acc = gh_car (s);
 
 
-      Music * mus = unsmob_music (gh_car (ev_acc));
-      if (mus)
-       {
-         bool b = get_outlet ()->try_music (mus);
+         Music * mus = unsmob_music (gh_car (ev_acc));
+         if (mus)
+           {
+             bool b = get_outlet ()->try_music (mus);
       
-         if (!b)
-           mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name()));
+             if (!b)
+               mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name()));
+           }
+         else
+           programming_error ("need music in quote.");
        }
-      else
-       programming_error ("need music in quote.");
     }
-
   event_idx_ ++; 
 }