projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c08f6ee
)
Cleanup: use a find_if().
author
Carl Hetherington
<cth@carlh.net>
Fri, 14 Apr 2023 14:05:23 +0000
(16:05 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 14 Apr 2023 14:05:23 +0000
(16:05 +0200)
src/dcp.cc
patch
|
blob
|
history
diff --git
a/src/dcp.cc
b/src/dcp.cc
index 02ff048f882117c8fe2562f65eeccca8a4faca37..a73ebbf59461fa0ab45a625db83f5a20e3aa9e9f 100644
(file)
--- a/
src/dcp.cc
+++ b/
src/dcp.cc
@@
-491,14
+491,7
@@
DCP::assets (bool ignore_unresolved) const
}
auto const id = j->asset_ref().id();
- auto already_got = false;
- for (auto k: assets) {
- if (k->id() == id) {
- already_got = true;
- }
- }
-
- if (!already_got) {
+ if (std::find_if(assets.begin(), assets.end(), [id](shared_ptr<Asset> asset) { return asset->id() == id; }) == assets.end()) {
auto o = j->asset_ref().asset();
assets.push_back (o);
/* More Interop special-casing */