projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b11c3b
)
Cleanup: use a std::find_if().
author
Carl Hetherington
<cth@carlh.net>
Tue, 8 Aug 2023 13:17:46 +0000
(15:17 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 8 Aug 2023 22:42:59 +0000
(
00:42
+0200)
src/lib/film.cc
patch
|
blob
|
history
diff --git
a/src/lib/film.cc
b/src/lib/film.cc
index 647675b8aa05832148d8596eef0d4ac6694ff887..171a9aa4df583f1facc9662ad8d333b034682c02 100644
(file)
--- a/
src/lib/film.cc
+++ b/
src/lib/film.cc
@@
-1929,13
+1929,10
@@
Film::references_dcp_audio () const
bool
Film::contains_atmos_content () const
{
- for (auto i: _playlist->content()) {
- if (i->atmos) {
- return true;
- }
- }
-
- return false;
+ auto const content = _playlist->content();
+ return std::find_if(content.begin(), content.end(), [](shared_ptr<const Content> content) {
+ return static_cast<bool>(content->atmos);
+ }) != content.end();
}