From b9040afd1dcfbee6b45bc3d54850ff50d51c8ee9 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 5 Jun 2016 20:48:36 +0200 Subject: [PATCH] Issue 4885/3: Remove ack_finder/ack_find_base ADD_ACKNOWLEDGER and ADD_END_ACKNOWLEDGER can work without them when the base is specified correctly when calling them inside of some CLASS::boot (). --- lily/include/engraver.hh | 3 --- lily/include/translator.hh | 14 +------------- lily/include/translator.icc | 7 ++++--- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index d0f6e8979c..928f6a969d 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -58,9 +58,6 @@ public: (t->*callback) (Grob_info (e, g)); return SCM_UNSPECIFIED; } - template - static SCM ack_find_base () - { return Callback2_wrapper::make_smob > (); } /** Announce element. Default: pass on to daddy. Utility diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 2d3199c76b..96309693aa 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -38,14 +38,11 @@ /* end #define */ #define TRANSLATOR_INHERIT(BASE) \ - using BASE::method_finder; \ - using BASE::ack_finder; + using BASE::method_finder; #define DECLARE_TRANSLATOR_CALLBACKS(NAME) \ template \ static SCM method_finder () { return method_find_base (); } \ - template \ - static SCM ack_finder () { return ack_find_base (); } \ /* end #define */ /* @@ -159,15 +156,6 @@ protected: // should be private. static SCM method_finder () { return SCM_UNDEFINED; } - // Overriden in Engraver. - template - static SCM - ack_find_base () { return SCM_UNDEFINED; } - - template - static SCM - ack_finder () { return SCM_UNDEFINED; } - virtual void derived_mark () const; static SCM event_class_symbol (const char *ev_class); SCM static_translator_description (const char *grobs, diff --git a/lily/include/translator.icc b/lily/include/translator.icc index 47bcd03b88..d43543cd8b 100644 --- a/lily/include/translator.icc +++ b/lily/include/translator.icc @@ -98,14 +98,15 @@ void add_acknowledger (SCM ptr, SCM &ack_hash); #define ADD_ACKNOWLEDGER(CLASS, NAME) \ - add_acknowledger (ack_finder<&CLASS::acknowledge_ ## NAME> (), \ + add_acknowledger (Callback2_wrapper::make_smob \ + > (), \ #NAME, acknowledge_static_array_drul_[START]); #define ADD_END_ACKNOWLEDGER(CLASS, NAME) \ - add_acknowledger (ack_finder<&CLASS::acknowledge_end_ ## NAME> (), \ + add_acknowledger (Callback2_wrapper::make_smob \ + > (), \ #NAME, acknowledge_static_array_drul_[STOP]); - /* Implement the method cl::listen_##m, and make it listen to stream events of class m. -- 2.39.5