From 2a7f3a1840bf2495656efff17a6c35ab3873b441 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 16 Jul 2025 00:50:12 +0200 Subject: Remove unused content pointer from change signals. --- src/lib/content.cc | 4 ++-- src/lib/content.h | 2 +- src/lib/film.cc | 8 ++++---- src/lib/film.h | 4 ++-- src/lib/player.cc | 2 +- src/lib/playlist.cc | 6 +++--- src/lib/playlist.h | 4 ++-- src/wx/audio_dialog.cc | 2 +- src/wx/content_timeline.cc | 2 +- src/wx/content_widget.h | 4 ++-- src/wx/dcp_referencing_dialog.cc | 2 +- src/wx/dcp_timeline.cc | 2 +- src/wx/film_editor.cc | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/lib/content.cc b/src/lib/content.cc index 196288f4a..6bb7c02c9 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -192,9 +192,9 @@ Content::signal_change(ChangeType c, int p) { try { if (c == ChangeType::PENDING || c == ChangeType::CANCELLED) { - Change(c, shared_from_this(), p, _change_signals_frequent); + Change(c, p, _change_signals_frequent); } else { - emit(boost::bind(boost::ref(Change), c, shared_from_this(), p, _change_signals_frequent)); + emit(boost::bind(boost::ref(Change), c, p, _change_signals_frequent)); } } catch (std::bad_weak_ptr &) { /* This must be during construction; never mind */ diff --git a/src/lib/content.h b/src/lib/content.h index 7d7700999..d922da558 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -216,7 +216,7 @@ public: bool has_mapped_audio() const; /* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */ - boost::signals2::signal, int, bool)> Change; + boost::signals2::signal Change; std::shared_ptr video; std::shared_ptr audio; diff --git a/src/lib/film.cc b/src/lib/film.cc index a1ab3ccf3..101a614ee 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -214,7 +214,7 @@ Film::Film(optional dir) _playlist_change_connection = _playlist->Change.connect(bind(&Film::playlist_change, this, _1)); _playlist_order_changed_connection = _playlist->OrderChange.connect(bind(&Film::playlist_order_changed, this)); - _playlist_content_change_connection = _playlist->ContentChange.connect(bind(&Film::playlist_content_change, this, _1, _2, _3, _4)); + _playlist_content_change_connection = _playlist->ContentChange.connect(bind(&Film::playlist_content_change, this, _1, _2, _3)); _playlist_length_change_connection = _playlist->LengthChange.connect(bind(&Film::playlist_length_change, this)); if (dir) { @@ -1597,7 +1597,7 @@ Film::active_frame_rate_change(DCPTime t) const } void -Film::playlist_content_change(ChangeType type, weak_ptr c, int p, bool frequent) +Film::playlist_content_change(ChangeType type, int p, bool frequent) { switch (p) { case ContentProperty::VIDEO_FRAME_RATE: @@ -1609,12 +1609,12 @@ Film::playlist_content_change(ChangeType type, weak_ptr c, int p, bool } if (type == ChangeType::DONE) { - emit(boost::bind(boost::ref(ContentChange), type, c, p, frequent)); + emit(boost::bind(boost::ref(ContentChange), type, p, frequent)); if (!frequent) { check_settings_consistency(); } } else { - ContentChange(type, c, p, frequent); + ContentChange(type, p, frequent); } set_dirty(true); diff --git a/src/lib/film.h b/src/lib/film.h index c4c55a12a..8574c700f 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -444,7 +444,7 @@ public: mutable boost::signals2::signal Change; /** Emitted when some property of our content has changed */ - mutable boost::signals2::signal, int, bool)> ContentChange; + mutable boost::signals2::signal ContentChange; /** Emitted when the film's length might have changed; this is not like a normal property as its value is derived from the playlist, so it has its own signal. @@ -475,7 +475,7 @@ private: void signal_change(ChangeType, int); void playlist_change(ChangeType); void playlist_order_changed(); - void playlist_content_change(ChangeType type, std::weak_ptr, int, bool frequent); + void playlist_content_change(ChangeType type, int, bool frequent); void playlist_length_change(); void maybe_add_content(std::weak_ptr, std::vector> const& weak_content, bool disable_audio_analysis); void audio_analysis_finished(); diff --git a/src/lib/player.cc b/src/lib/player.cc index 53ce612e1..985bd3a9c 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -144,7 +144,7 @@ Player::connect() be first. */ _playlist_change_connection = playlist()->Change.connect(bind(&Player::playlist_change, this, _1), boost::signals2::at_front); - _playlist_content_change_connection = playlist()->ContentChange.connect(bind(&Player::playlist_content_change, this, _1, _3, _4)); + _playlist_content_change_connection = playlist()->ContentChange.connect(bind(&Player::playlist_content_change, this, _1, _2, _3)); } diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 7385c8ad5..8c60a5458 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -89,7 +89,7 @@ Playlist::~Playlist() void -Playlist::content_change(weak_ptr weak_film, ChangeType type, weak_ptr content, int property, bool frequent) +Playlist::content_change(weak_ptr weak_film, ChangeType type, int property, bool frequent) { auto film = weak_film.lock(); DCPOMATIC_ASSERT(film); @@ -133,7 +133,7 @@ Playlist::content_change(weak_ptr weak_film, ChangeType type, weak_p } } - ContentChange(type, content, property, frequent); + ContentChange(type, property, frequent); } @@ -516,7 +516,7 @@ Playlist::reconnect(shared_ptr film) disconnect(); for (auto i: _content) { - _content_connections.push_back(i->Change.connect(boost::bind(&Playlist::content_change, this, film, _1, _2, _3, _4))); + _content_connections.push_back(i->Change.connect(boost::bind(&Playlist::content_change, this, film, _1, _2, _3))); } } diff --git a/src/lib/playlist.h b/src/lib/playlist.h index c26de5426..0d38cbf67 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -87,10 +87,10 @@ public: /** Emitted when the length might have changed; may sometimes be emitted when it has not */ mutable boost::signals2::signal LengthChange; - mutable boost::signals2::signal, int, bool)> ContentChange; + mutable boost::signals2::signal ContentChange; private: - void content_change(std::weak_ptr, ChangeType, std::weak_ptr, int, bool); + void content_change(std::weak_ptr, ChangeType, int, bool); void disconnect(); void reconnect(std::shared_ptr film); diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index 9f31107f4..795a39a44 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -164,7 +164,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr film, FilmViewer& v overall_sizer->SetSizeHints (this); _film_connection = film->Change.connect (boost::bind(&AudioDialog::film_change, this, _1, _2)); - _film_content_connection = film->ContentChange.connect(boost::bind(&AudioDialog::content_change, this, _1, _3)); + _film_content_connection = film->ContentChange.connect(boost::bind(&AudioDialog::content_change, this, _1, _2)); DCPOMATIC_ASSERT (film->directory()); if (content) { SetTitle(wxString::Format(_("%s audio - %s"), variant::wx::dcpomatic(), std_to_wx(content->path(0).string()))); diff --git a/src/wx/content_timeline.cc b/src/wx/content_timeline.cc index f4388b2be..52e0cb8ca 100644 --- a/src/wx/content_timeline.cc +++ b/src/wx/content_timeline.cc @@ -122,7 +122,7 @@ ContentTimeline::ContentTimeline(wxWindow* parent, ContentPanel* cp, shared_ptr< SetMinSize (wxSize (640, 4 * pixels_per_track() + 96)); _film_changed_connection = film->Change.connect(bind(&ContentTimeline::film_change, this, _1, _2)); - _film_content_change_connection = film->ContentChange.connect(bind(&ContentTimeline::film_content_change, this, _1, _3, _4)); + _film_content_change_connection = film->ContentChange.connect(bind(&ContentTimeline::film_content_change, this, _1, _2, _3)); Bind(wxEVT_TIMER, boost::bind(&ContentTimeline::update_playhead, this)); _timer.Start (200, wxTIMER_CONTINUOUS); diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h index f7edf6b30..3c736f2a9 100644 --- a/src/wx/content_widget.h +++ b/src/wx/content_widget.h @@ -118,9 +118,9 @@ public: for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) { #if BOOST_VERSION >= 106100 - _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3))); + _connections.push_back((*i)->Change.connect(boost::bind(&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_2))); #else - _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3))); + _connections.push_back((*i)->Change.connect(boost::bind(&ContentWidget::model_changed, this, _1, _2))); #endif } } diff --git a/src/wx/dcp_referencing_dialog.cc b/src/wx/dcp_referencing_dialog.cc index 63631b9fd..9f4a71658 100644 --- a/src/wx/dcp_referencing_dialog.cc +++ b/src/wx/dcp_referencing_dialog.cc @@ -47,7 +47,7 @@ DCPReferencingDialog::DCPReferencingDialog(wxWindow* parent, shared_ptrChange.connect(boost::bind(&DCPReferencingDialog::film_changed, this, _1, _2)); - _film_content_connection = film->ContentChange.connect(boost::bind(&DCPReferencingDialog::film_content_changed, this, _1, _3)); + _film_content_connection = film->ContentChange.connect(boost::bind(&DCPReferencingDialog::film_content_changed, this, _1, _2)); _overall_sizer->Add(_dcp_grid, 1, wxALL, DCPOMATIC_DIALOG_BORDER); SetSizer(_overall_sizer); diff --git a/src/wx/dcp_timeline.cc b/src/wx/dcp_timeline.cc index a5b106c00..6ea91a060 100644 --- a/src/wx/dcp_timeline.cc +++ b/src/wx/dcp_timeline.cc @@ -167,7 +167,7 @@ DCPTimeline::DCPTimeline(wxWindow* parent, shared_ptr film) _canvas->Bind(wxEVT_MOTION, boost::bind(&DCPTimeline::mouse_moved, this, _1)); _film_connection = film->Change.connect(boost::bind(&DCPTimeline::film_changed, this, _1, _2)); - _film_content_connection = film->ContentChange.connect(boost::bind(&DCPTimeline::film_content_changed, this, _1, _3)); + _film_content_connection = film->ContentChange.connect(boost::bind(&DCPTimeline::film_content_changed, this, _1, _2)); _menu = new wxMenu; _add_reel_boundary = _menu->Append(ID_add_reel_boundary, _("Add reel boundary")); diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 11a00b460..9a5edac32 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -152,7 +152,7 @@ FilmEditor::set_film (shared_ptr film) } _film->Change.connect (bind(&FilmEditor::film_change, this, _1, _2)); - _film->ContentChange.connect (bind(&FilmEditor::film_content_change, this, _1, _3)); + _film->ContentChange.connect(bind(&FilmEditor::film_content_change, this, _1, _2)); if (!_film->content().empty()) { _content_panel->set_selection (_film->content().front()); -- cgit v1.2.3