From: Han-Wen Nienhuys Date: Sat, 21 Feb 2004 08:20:15 +0000 (+0000) Subject: (class Quote_iterator): new file. X-Git-Tag: release/2.1.26~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ed213f0202562f994b1a7579d05fd6a204a41815;p=lilypond.git (class Quote_iterator): new file. --- diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index ed26decf3f..680b616fe1 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -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_ ++; }