summaryrefslogtreecommitdiff
path: root/lily/metronome-engraver.cc
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-05-29 09:28:51 +0200
committerDavid Kastrup <dak@gnu.org>2016-05-31 11:14:18 +0200
commitdbaf1e56e37be0e204231c5bf1adcb14bd8ac3b8 (patch)
tree72ef0ea2bdc704ce797c7437c1c110b1ceb56a3b /lily/metronome-engraver.cc
parent4b4a2cae9953cff69159f10763e990f5e4265ddd (diff)
Issue 4865/2: Rewrite of new translator initializations
This was done by running the following Bash script: git grep '^ADD_TRANSLATOR (' lily|sed 's/^\([^:]*\):ADD_TRANSLATOR ( *\([a-zA-Z_]\+\),.*$/\1 \2/' | while read file translator do lines="$(git grep -h '^\(ADD_ACKNOWLEDGER\|ADD_END_ACKNOWLEDGER\|IMPLEMENT_TRANSLATOR_LISTENER\) ('$translator, $file)" sed -i "$(echo "$lines"|sed 's+^..*$+/&/d+')" $file sed -i "/^ADD_TRANSLATOR ($translator,/i\\ void\\ $translator::boot ()\\ {\\ $(echo "$lines"|sed 's/IMPLEMENT_TRANSLATOR_LISTENER/ADD_LISTENER/;s/^./ &/;s/$/\\/') }\\ " $file done
Diffstat (limited to 'lily/metronome-engraver.cc')
-rw-r--r--lily/metronome-engraver.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc
index e1de3e23e0..21aab95ee2 100644
--- a/lily/metronome-engraver.cc
+++ b/lily/metronome-engraver.cc
@@ -61,7 +61,6 @@ Metronome_mark_engraver::Metronome_mark_engraver ()
tempo_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Metronome_mark_engraver, tempo_change);
void
Metronome_mark_engraver::listen_tempo_change (Stream_event *ev)
{
@@ -168,9 +167,15 @@ Metronome_mark_engraver::process_music ()
}
}
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_aligned);
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_alignment);
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, grob);
+
+void
+Metronome_mark_engraver::boot ()
+{
+ ADD_LISTENER (Metronome_mark_engraver, tempo_change);
+ ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_aligned);
+ ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_alignment);
+ ADD_ACKNOWLEDGER (Metronome_mark_engraver, grob);
+}
ADD_TRANSLATOR (Metronome_mark_engraver,
/* doc */