]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie-performer.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / tie-performer.cc
index f47e3ae597914533cc389217095a5a66eca30e07..bf3c513bcbdf578ba1aa44814500fcea2c54e178 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "performer.hh"
 #include "audio-item.hh"
 #include "pqueue.hh"
 
-
 class Tie_performer : public Performer
 {
   Music *event_;
   Music *last_event_;
-  Array<Audio_element_info> now_heads_;
-  Array<Audio_element_info> heads_to_tie_;
+  vector<Audio_element_info> now_heads_;
+  vector<Audio_element_info> heads_to_tie_;
 
   bool ties_created_;
 
 protected:
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void start_translation_timestep ();
+  void stop_translation_timestep ();
+  void start_translation_timestep ();
   virtual void acknowledge_audio_element (Audio_element_info);
   virtual bool try_music (Music *);
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void process_music ();
 public:
   TRANSLATOR_DECLARATIONS (Tie_performer);
 };
@@ -44,9 +43,7 @@ bool
 Tie_performer::try_music (Music *mus)
 {
   if (mus->is_mus_type ("tie-event"))
-    {
-      event_ = mus;
-    }
+    event_ = mus;
 
   return true;
 }
@@ -63,8 +60,8 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
 {
   if (Audio_note *an = dynamic_cast<Audio_note *> (inf.elem_))
     {
-      now_heads_.push (inf);
-      for (int i = heads_to_tie_.size (); i--;)
+      now_heads_.push_back (inf);
+      for (vsize i = heads_to_tie_.size (); i--;)
        {
          Music *right_mus = inf.event_;
 
@@ -73,7 +70,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
 
          if (right_mus && left_mus
              && ly_is_equal (right_mus->get_property ("pitch"),
-                              left_mus->get_property ("pitch")))
+                             left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
              ties_created_ = true;
@@ -111,9 +108,8 @@ Tie_performer::stop_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Tie_performer,
-               /* descr */ "Generate ties between noteheads of equal pitch.",
-               /* creats*/ "",
-               /* accepts */ "tie-event",
-               /* acks  */ "",
-               /* reads */ "tieMelismaBusy",
+               /* doc */ "Generate ties between noteheads of equal pitch.",
+               /* create */ "",
+               /* accept */ "tie-event",
+               /* read */ "tieMelismaBusy",
                /* write */ "");