]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/translator.icc
Issue 4351/2: Rename Translator_void_method_ptr to Translator::Callback
[lilypond.git] / lily / include / translator.icc
index 114cda85ab47adcb106bbe3c3909883e4f1ade50..9f4def39e08712c86975a0f3ea2234aff6d6c8bd 100644 (file)
   DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)            \
   DEFINE_ACKNOWLEDGERS(classname) \
   DEFINE_TRANSLATOR_LISTENER_LIST(classname) \
+
 #define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T)                        \
   void                                                                  \
-  T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])    \
+  T::fetch_precomputable_methods (Translator::Callback ptrs[])         \
   {                                                                     \
     ptrs[START_TRANSLATION_TIMESTEP] =                                  \
-      ((Translator_void_method_ptr) & T::start_translation_timestep ==  \
-       (Translator_void_method_ptr) & Translator::start_translation_timestep) \
-      ? 0                                                               \
-      : (Translator_void_method_ptr) & T::start_translation_timestep;   \
-                                                                        \
-    ptrs[STOP_TRANSLATION_TIMESTEP] =                                   \
-      ((Translator_void_method_ptr) & T::stop_translation_timestep == (Translator_void_method_ptr) & Translator::stop_translation_timestep) \
-      ? 0                                                               \
-      : (Translator_void_method_ptr) & T::stop_translation_timestep;    \
-                                                                        \
-    ptrs[PROCESS_MUSIC] =                                               \
-      ((Translator_void_method_ptr) & T::process_music == (Translator_void_method_ptr) & Translator::process_music) \
-      ? 0                                                               \
-      : (Translator_void_method_ptr) & T::process_music;                \
-                                                                        \
-    ptrs[PROCESS_ACKNOWLEDGED] =                                        \
-      ((Translator_void_method_ptr) & T::process_acknowledged == (Translator_void_method_ptr) & Translator::process_acknowledged) \
-      ? 0                                                               \
-      : (Translator_void_method_ptr) & T::process_acknowledged;         \
+      (&T::start_translation_timestep                                  \
+       == &Translator::start_translation_timestep)                     \
+      ? 0                                                              \
+      : static_cast<Callback> (&T::start_translation_timestep);                \
+                                                                       \
+    ptrs[STOP_TRANSLATION_TIMESTEP] =                                  \
+      (& T::stop_translation_timestep == & Translator::stop_translation_timestep) \
+      ? 0                                                              \
+      : static_cast<Callback> (&T::stop_translation_timestep);         \
+                                                                       \
+    ptrs[PROCESS_MUSIC] =                                              \
+      (&T::process_music == &Translator::process_music)                        \
+      ? 0                                                              \
+      : static_cast<Callback> (&T::process_music);                     \
+                                                                       \
+    ptrs[PROCESS_ACKNOWLEDGED] =                                       \
+      (&T::process_acknowledged == &Translator::process_acknowledged)  \
+      ? 0                                                              \
+      : static_cast<Callback> (&T::process_acknowledged);              \
   }
 
 void add_acknowledger (Translator::Grob_info_callback ptr,