From 501096cb9a14e1722ee3d84ecdbd41f79df6467a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Jan 2026 00:32:30 +0100 Subject: Rename n -> ffmpeg_count and use count_if(). --- src/wx/content_menu.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 63a4be19f..d042abf90 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -146,14 +146,13 @@ ContentMenu::popup(weak_ptr film, ContentList c, TimelineContentViewList v _repeat->Enable(!_content.empty()); - int n = 0; - for (auto i: _content) { - if (dynamic_pointer_cast(i)) { - ++n; - } - } + auto ffmpeg_count = std::count_if( + _content.begin(), + _content.end(), + [](shared_ptr content) { return static_cast(dynamic_pointer_cast(content)); } + ); - _join->Enable(n > 1); + _join->Enable(ffmpeg_count > 1); _find_missing->Enable(_content.size() == 1 && (!paths_exist(_content.front()->paths()) || !paths_exist(_content.front()->font_paths()))); _properties->Enable(_content.size() == 1); -- cgit v1.2.3