]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/quote-iterator.cc
* lily/melody-engraver.cc (acknowledge_stem): restart MelodyItem
[lilypond.git] / lily / quote-iterator.cc
index 7e561c6bc3c938e4864aa646a4c559d7be71b250..2eecb72fe4c930a20f994a0b6d8d58f7c262861e 100644 (file)
@@ -7,18 +7,19 @@
 */
 
 #include "context.hh"
-#include "event.hh"
+#include "music.hh"
 #include "music-sequence.hh"
 #include "lily-guile.hh"
 #include "music-wrapper-iterator.hh"
 #include "warn.hh"
+#include "input.hh"
 
 class Quote_iterator : public Music_wrapper_iterator
 {
 public:
   Quote_iterator ();
   Moment vector_moment (int idx) const;
-  Interpretation_context_handle quote_outlet_;
+  Context_handle quote_outlet_;
 
   Moment start_moment_;
   Moment stop_moment_;
@@ -116,9 +117,7 @@ Quote_iterator::construct_children ()
       quote_outlet_.set_context (cue_context);
     }
   else
-    {
-      quote_outlet_.set_context (get_outlet ());
-    }
+    quote_outlet_.set_context (get_outlet ());
 
   event_vector_ = get_music ()->get_property ("quoted-events");
 
@@ -159,14 +158,14 @@ Quote_iterator::pending_moment () const
   Moment m (infty);
 
   if (Music_wrapper_iterator::ok ())
-    m = m <? Music_wrapper_iterator::pending_moment ();
+    m = min (m, Music_wrapper_iterator::pending_moment ());
 
   /*
     In case event_idx_ < 0, we're not initted yet, and the wrapped
     music expression determines the starting moment.
   */
   if (quote_ok ())
-    m = m <? vector_moment (event_idx_) - start_moment_;
+    m = min (m, vector_moment (event_idx_) - start_moment_);
 
   return m;
 }
@@ -229,7 +228,7 @@ Quote_iterator::process (Moment m)
 
          Music *mus = unsmob_music (scm_car (ev_acc));
          if (!mus)
-           programming_error ("need music in quote.");
+           programming_error ("no music found in quote");
          else if (accept_music_type (mus))
            {
              if (quote_pitch || me_pitch)
@@ -251,7 +250,8 @@ Quote_iterator::process (Moment m)
 
              bool b = quote_outlet_.get_outlet ()->try_music (mus);
              if (!b)
-               mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name ()));
+               mus->origin ()->warning (_f ("in quotation: junking event %s",
+                                            mus->name ()));
            }
        }