]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/simultaneous-music-iterator.cc
*** empty log message ***
[lilypond.git] / lily / simultaneous-music-iterator.cc
index 1c5a8002062652b2ca3b8424b807699a912eac22..16691c3e63170de25d9dfb7a5d7cc6d56fb115f2 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "simultaneous-music-iterator.hh"
@@ -50,7 +50,7 @@ Simultaneous_music_iterator::construct_children ()
       /* if create_separate_contexts_ is set, create a new context with the
         number number as name */
 
-      SCM name = ly_symbol2scm (get_outlet ()->context_name ().to_str0 ());
+      SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ());
       Context *t = (j && create_separate_contexts_)
        ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
        : get_outlet ();
@@ -67,7 +67,7 @@ Simultaneous_music_iterator::construct_children ()
          tail = SCM_CDRLOC (*tail);
        }
       else
-       mi->set_context (0);
+       mi->quit ();
     }
 }
 
@@ -80,18 +80,14 @@ Simultaneous_music_iterator::process (Moment until)
       Music_iterator *i = unsmob_iterator (scm_car (*proc));
       if (i->run_always ()
          || i->pending_moment () == until)
-       {
-         i->process (until);
-       }
+       i->process (until);
       if (!i->ok ())
        {
          i->quit ();
          *proc = scm_cdr (*proc);
        }
       else
-       {
-         proc = SCM_CDRLOC (*proc);
-       }
+       proc = SCM_CDRLOC (*proc);
     }
 }
 
@@ -104,7 +100,7 @@ Simultaneous_music_iterator::pending_moment () const
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
     {
       Music_iterator *it = unsmob_iterator (scm_car (s));
-      next = next <? it->pending_moment ();
+      next = min (next, it->pending_moment ());
     }
 
   return next;