mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Use lambdas rather than std::bind(std::ref(Signal)) for signal forwarding
This commit is contained in:
parent
7f289551ae
commit
7161ce167c
@ -432,9 +432,9 @@ AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
|
||||
, active_line_connection(c->selectionController->AddActiveLineListener(&AudioTimingControllerDialogue::OnActiveLineChanged, this))
|
||||
, selection_connection(c->selectionController->AddSelectionListener(&AudioTimingControllerDialogue::OnSelectedSetChanged, this))
|
||||
{
|
||||
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
||||
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
||||
seconds_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
||||
keyframes_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||
video_position_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||
seconds_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||
|
||||
Revert();
|
||||
}
|
||||
|
@ -172,11 +172,10 @@ AudioTimingControllerKaraoke::AudioTimingControllerKaraoke(agi::Context *c, AssK
|
||||
slots.push_back(kara->AddSyllablesChangedListener(&AudioTimingControllerKaraoke::Revert, this));
|
||||
slots.push_back(OPT_SUB("Audio/Auto/Commit", &AudioTimingControllerKaraoke::OnAutoCommitChange, this));
|
||||
|
||||
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
||||
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
||||
keyframes_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||
video_position_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||
|
||||
Revert();
|
||||
|
||||
}
|
||||
|
||||
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user