]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol-engraver.cc
unsmob_pitch -> Pitch::unsmob and related
[lilypond.git] / lily / staff-symbol-engraver.cc
index 55e118245f2c793ac5b2ff92e995595e639d586e..12ec0c704b135a055973611d596726481ed40c33 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -46,8 +46,19 @@ protected:
   DECLARE_TRANSLATOR_LISTENER (staff_span);
   virtual void finalize ();
   void process_music ();
+  virtual void derived_mark () const;
 };
 
+void
+Staff_symbol_engraver::derived_mark () const
+{
+  for (LEFT_and_RIGHT (d))
+    {
+      if (span_events_[d])
+        scm_gc_mark (span_events_[d]->self_scm ());
+    }
+}
+
 Staff_symbol_engraver::~Staff_symbol_engraver ()
 {
   if (span_)
@@ -84,7 +95,7 @@ Staff_symbol_engraver::process_music ()
       finished_span_ = span_;
       span_ = 0;
       if (first_start_)
-       first_start_ = false;
+        first_start_ = false;
     }
 
   if (span_events_[START]
@@ -99,7 +110,7 @@ Staff_symbol_engraver::start_spanner ()
     {
       span_ = make_spanner ("StaffSymbol", SCM_EOL);
       span_->set_bound (LEFT,
-                       unsmob_grob (get_property ("currentCommandColumn")));
+                        Grob::unsmob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -110,12 +121,12 @@ Staff_symbol_engraver::stop_spanner ()
     return;
 
   if (!finished_span_->get_bound (RIGHT))
-    finished_span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+    finished_span_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
 
   announce_end_grob (finished_span_,
-                    span_events_[STOP]
-                    ? span_events_[STOP]->self_scm ()
-                    : SCM_EOL);
+                     span_events_[STOP]
+                     ? span_events_[STOP]->self_scm ()
+                     : SCM_EOL);
 
   finished_span_ = 0;
 }
@@ -155,15 +166,15 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob);
 
 ADD_TRANSLATOR (Staff_symbol_engraver,
-               /* doc */
-               "Create the constellation of five (default) staff lines.",
+                /* doc */
+                "Create the constellation of five (default) staff lines.",
 
-               /* create */
-               "StaffSymbol ",
+                /* create */
+                "StaffSymbol ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );