]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/accidental-engraver.cc
Imported Upstream version 2.14.2
[lilypond.git] / lily / accidental-engraver.cc
index f84e281d48f4672dbe4abcea5c5434d05b1efcda..9bd02ee82821b44ce2205cafa7fc6b1a578fc958 100644 (file)
@@ -1,10 +1,21 @@
 /*
-  accidental-engraver.cc -- implement Accidental_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Modified 2001--2002 by Rune Zedeler <rz@daimi.au.dk>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "accidental-placement.hh"
@@ -69,7 +80,7 @@ protected:
 
   void stop_translation_timestep ();
   void process_acknowledged ();
-  
+
   virtual void finalize ();
   virtual void derived_mark () const;
 
@@ -234,8 +245,8 @@ Accidental_engraver::process_acknowledged ()
          bool cautionary = to_boolean (note->get_property ("cautionary"));
          if (caut.score () > acc.score ())
            {
-             acc.need_acc |= caut.need_acc; 
-             acc.need_restore |= caut.need_restore; 
+             acc.need_acc |= caut.need_acc;
+             acc.need_restore |= caut.need_restore;
 
              cautionary = true;
            }
@@ -250,7 +261,7 @@ Accidental_engraver::process_acknowledged ()
          */
          if (!note->in_event_class ("trill-span-event"))
            {
-             if (acc.need_acc)       
+             if (acc.need_acc)
                create_accidental (&accidentals_[i], acc.need_restore, cautionary);
 
              if (forced || cautionary)
@@ -321,7 +332,7 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
   Accidental_placement::add_accidental (accidental_placement_, a);
 
   note_head->set_object ("accidental-grob", a->self_scm ());
-  
+
   return a;
 }
 
@@ -366,7 +377,7 @@ Accidental_engraver::stop_translation_timestep ()
     }
 
   for (vsize i = accidentals_.size (); i--;)
-    {      
+    {
       Stream_event *note = accidentals_[i].melodic_;
       Context *origin = accidentals_[i].origin_;
 
@@ -404,7 +415,7 @@ Accidental_engraver::stop_translation_timestep ()
          else
            {
              /*
-               not really really correct if there is more than one
+               not really correct if there is more than one
                note head with the same notename.
              */
              localsig = ly_assoc_prepend_x (localsig, key,
@@ -426,6 +437,7 @@ Accidental_engraver::stop_translation_timestep ()
 
   accidental_placement_ = 0;
   accidentals_.clear ();
+  note_columns_.clear ();
   left_objects_.clear ();
   right_objects_.clear ();
 }