]> git.donarmstrong.com Git - lilypond.git/commitdiff
(do_announces): move recursion call out
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 20 Aug 2005 23:31:39 +0000 (23:31 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 20 Aug 2005 23:31:39 +0000 (23:31 +0000)
of while loop.

ChangeLog
lily/engraver-group.cc
lily/performer-group.cc

index 926c894c082f4d674318c373f4a1013d89b7d663..2219917fc7bf194b8bf39245ddba9bec4ad1b84b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-08-21  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/engraver-group.cc (do_announces): move recursion call out
+       of while loop. 
+
        * lily/drum-note-performer.cc (class Drum_note_performer): use
        process_music everywhere.
 
index 6c2c4685fb5b6fb172d60a5533c867b842798700..ff0271515c4396c0cd420f48c1c3031b5f8a9334 100644 (file)
@@ -93,19 +93,19 @@ Engraver_group::pending_grob_count () const
 void
 Engraver_group::do_announces ()
 {
-  do
+  for (SCM s = context ()->children_contexts ();
+       scm_is_pair (s); s = scm_cdr (s))
     {
-      for (SCM s = context ()->children_contexts ();
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         Context *c = unsmob_context (scm_car (s));
-         Engraver_group *group
-           = dynamic_cast<Engraver_group *> (c->implementation ());
-         if (group)
-           group->do_announces ();
-       }
+      Context *c = unsmob_context (scm_car (s));
+      Engraver_group *group
+       = dynamic_cast<Engraver_group *> (c->implementation ());
+      if (group)
+       group->do_announces ();
+    }
 
-      while (1)
+ do
+    {
+       while (1)
        {
          precomputed_translator_foreach (PROCESS_ACKNOWLEDGED);
          if (announce_infos_.size () == 0)
index 64bd897f207ecd374e1e6759667d4e1517626f19..a1e164b7a809544ccf34c6cf3c42ea79d111cc1f 100644 (file)
@@ -62,6 +62,16 @@ performer_each (SCM list, Performer_method method)
 void
 Performer_group::do_announces ()
 {
+  for (SCM s = context ()->children_contexts ();
+       scm_is_pair (s); s = scm_cdr (s))
+    {
+      Context *c = unsmob_context (scm_car (s));
+      Performer_group *group
+       = dynamic_cast<Performer_group *> (c->implementation ());
+      if (group)
+       group->do_announces ();
+    }
+
   while (1)
     {
       performer_each (get_simple_trans_list (),