]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Issue 4365: non-member unsmob<T> replaces T::unsmob and T::is_smob
[lilypond.git] / lily / grob.cc
index 435a6faff3a92447ad67c637678a89129f5a09dd..2377a5d963f92d794916185c6518b395fcf29aca 100644 (file)
@@ -127,7 +127,7 @@ Grob::get_stencil () const
     return 0;
 
   SCM stil = get_property ("stencil");
-  return Stencil::unsmob (stil);
+  return unsmob<Stencil> (stil);
 }
 
 Stencil
@@ -136,7 +136,7 @@ Grob::get_print_stencil () const
   SCM stil = get_property ("stencil");
 
   Stencil retval;
-  if (Stencil *m = Stencil::unsmob (stil))
+  if (Stencil *m = unsmob<Stencil> (stil))
     {
       retval = *m;
       bool transparent = to_boolean (get_property ("transparent"));
@@ -180,7 +180,7 @@ Grob::get_print_stencil () const
           /* Call the scheme procedure stencil-whiteout in scm/stencils.scm */
           /* to add a round-filled-box stencil to the stencil list */
           retval
-            = *Stencil::unsmob (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
+            = *unsmob<Stencil> (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
                                            retval.smobbed_copy ()));
         }
 
@@ -720,13 +720,13 @@ void
 Grob::programming_error (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = Grob::unsmob (cause))
+  while (Grob *g = unsmob<Grob> (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = Music::unsmob (cause))
+  if (Music *m = unsmob<Music> (cause))
     m->origin ()->programming_error (s);
-  else if (Stream_event *ev = Stream_event::unsmob (cause))
+  else if (Stream_event *ev = unsmob<Stream_event> (cause))
     ev->origin ()->programming_error (s);
   else
     ::programming_error (s);
@@ -736,13 +736,13 @@ void
 Grob::warning (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = Grob::unsmob (cause))
+  while (Grob *g = unsmob<Grob> (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = Music::unsmob (cause))
+  if (Music *m = unsmob<Music> (cause))
     m->origin ()->warning (s);
-  else if (Stream_event *ev = Stream_event::unsmob (cause))
+  else if (Stream_event *ev = unsmob<Stream_event> (cause))
     ev->origin ()->warning (s);
   else
     ::warning (s);
@@ -848,7 +848,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
 SCM
 Grob::stencil_height (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   return grob_stencil_extent (me, Y_AXIS);
 }
 
@@ -856,8 +856,8 @@ MAKE_SCHEME_CALLBACK (Grob, pure_stencil_height, 3);
 SCM
 Grob::pure_stencil_height (SCM smob, SCM /* beg */, SCM /* end */)
 {
-  Grob *me = Grob::unsmob (smob);
-  if (Stencil::is_smob (me->get_property_data ("stencil")))
+  Grob *me = unsmob<Grob> (smob);
+  if (unsmob<Stencil> (me->get_property_data ("stencil")))
     return grob_stencil_extent (me, Y_AXIS);
 
   return ly_interval2scm (Interval ());
@@ -868,7 +868,7 @@ MAKE_SCHEME_CALLBACK (Grob, y_parent_positioning, 1);
 SCM
 Grob::y_parent_positioning (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   Grob *par = me->get_parent (Y_AXIS);
   if (par)
     (void) par->get_property ("positioning-done");
@@ -880,7 +880,7 @@ MAKE_SCHEME_CALLBACK (Grob, x_parent_positioning, 1);
 SCM
 Grob::x_parent_positioning (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
 
   Grob *par = me->get_parent (X_AXIS);
   if (par)
@@ -893,7 +893,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_width, 1);
 SCM
 Grob::stencil_width (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   return grob_stencil_extent (me, X_AXIS);
 }
 
@@ -901,7 +901,7 @@ Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 {
   for (; scm_is_pair (elist); elist = scm_cdr (elist))
-    if (Grob *s = Grob::unsmob (scm_car (elist)))
+    if (Grob *s = unsmob<Grob> (scm_car (elist)))
       {
         if (common)
           common = common->common_refpoint (s, a);