]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4899/6: Remove {Translator,Engraver}::ack_find_base
authorDavid Kastrup <dak@gnu.org>
Sat, 18 Jun 2016 08:49:06 +0000 (10:49 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 23 Jun 2016 08:12:24 +0000 (10:12 +0200)
The indirection and complication added by it does not really
help in any manner.

lily/include/engraver.hh
lily/include/translator.hh

index d0f6e8979ced98b1688462f03409d6936be10185..928f6a969dbddad717c25856351b53b9fba4f5d5 100644 (file)
@@ -58,9 +58,6 @@ public:
     (t->*callback) (Grob_info (e, g));
     return SCM_UNSPECIFIED;
   }
-  template <class T, void (T::*callback)(Grob_info)>
-  static SCM ack_find_base ()
-  { return Callback2_wrapper::make_smob<ack_trampoline<T, callback> > (); }
 
   /**
      Announce element. Default: pass on to daddy. Utility
index d4ea41f93418e854fe42df12d8eacb80c5bd1716..cd050917123c2e52599c4c042ef23156fee0ddb0 100644 (file)
@@ -53,7 +53,9 @@
     return Callback_wrapper::make_smob<trampoline<NAME, mf> > ();       \
   }                                                                     \
   template <void (NAME::*callback)(Grob_info)>                          \
-  static SCM ack_finder () { return ack_find_base<NAME, callback> (); } \
+  static SCM ack_finder () {                                            \
+    return Callback2_wrapper::make_smob<ack_trampoline <NAME, callback> > (); \
+  }                                                                     \
   /* end #define */
 
 /*
@@ -163,14 +165,13 @@ protected:                      // should be private.
   static SCM
   method_finder () { return SCM_UNDEFINED; }
 
-  // Overriden in Engraver.
-  template <class T, void (T::*callback)(Grob_info)>
-  static SCM
-  ack_find_base () { return SCM_UNDEFINED; }
+  // Overriden in Engraver.  Don't instantiate.
+  template <class T, void (T::*)(Grob_info)>
+  static SCM ack_trampoline (SCM, SCM, SCM);
 
+  // Overriden in Engraver.  Don't instantiate.
   template <void (Translator::*)(Grob_info)>
-  static SCM
-  ack_finder () { return SCM_UNDEFINED; }
+  static SCM ack_finder ();
 
   virtual void derived_mark () const;
   static SCM event_class_symbol (const char *ev_class);