]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/ledger-line-spanner.cc
Doc: CG Updated section 1.3 - experienced devs
[lilypond.git] / lily / ledger-line-spanner.cc
index f4bf36ef48cf8e64f574d5ad9d19fccb190a1fe1..b0e8fee3c2321b8e7f078a7946048714deca168a 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--2015 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
@@ -32,7 +32,6 @@ struct Ledger_line_spanner
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 static void
@@ -66,7 +65,7 @@ MAKE_SCHEME_CALLBACK (Ledger_line_spanner, set_spacing_rods, 1);
 SCM
 Ledger_line_spanner::set_spacing_rods (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
+  Spanner *me = unsmob<Spanner> (smob);
 
   // find size of note heads.
   Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
@@ -164,7 +163,7 @@ MAKE_SCHEME_CALLBACK (Ledger_line_spanner, print, 1);
 SCM
 Ledger_line_spanner::print (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
+  Spanner *me = unsmob<Spanner> (smob);
 
   extract_grob_set (me, "note-heads", heads);
 
@@ -193,7 +192,7 @@ Ledger_line_spanner::print (SCM smob)
       Axis a = Axis (i);
       common[a] = common_refpoint_of_array (heads, me, a);
       for (vsize i = heads.size (); i--;)
-        if (Grob *g = Grob::unsmob (me->get_object ("accidental-grob")))
+        if (Grob *g = unsmob<Grob> (me->get_object ("accidental-grob")))
           common[a] = common[a]->common_refpoint (g, a);
     }
 
@@ -287,7 +286,7 @@ Ledger_line_spanner::print (SCM smob)
               Interval x_extent = ledger_size;
 
               if (i == 0)
-                if (Grob *g = Grob::unsmob (h->get_object ("accidental-grob")))
+                if (Grob *g = unsmob<Grob> (h->get_object ("accidental-grob")))
                   {
                     Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
                     Real d
@@ -339,7 +338,6 @@ ADD_INTERFACE (Ledger_line_spanner,
 
 struct Ledgered_interface
 {
-  DECLARE_GROB_INTERFACE ();
 };
 
 ADD_INTERFACE (Ledgered_interface,