Use lambdas rather than std::bind(std::ref(Signal)) for signal forwarding

This commit is contained in:
Thomas Goyne 2014-04-23 15:48:39 -07:00
parent 7f289551ae
commit 7161ce167c
2 changed files with 5 additions and 6 deletions

View File

@ -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();
}

View File

@ -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) {