summaryrefslogtreecommitdiff
path: root/test/rewrite_subs.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-11 00:16:40 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commitd95eacd3851a20e52202465ec22b4f72a4983dc8 (patch)
tree1dfc1092ae7d2e6b6b7c313ad808415f578d9712 /test/rewrite_subs.cc
parentcbee0d077e698541afcea82a95bafcea5245ab89 (diff)
Replace std::list with std::vector in the API.
Diffstat (limited to 'test/rewrite_subs.cc')
-rw-r--r--test/rewrite_subs.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/rewrite_subs.cc b/test/rewrite_subs.cc
index a6c708e3..0a6f4c6c 100644
--- a/test/rewrite_subs.cc
+++ b/test/rewrite_subs.cc
@@ -61,14 +61,10 @@ main (int argc, char* argv[])
DCP* dcp = new DCP (argv[1]);
dcp->read ();
- list<shared_ptr<CPL> > cpls = dcp->cpls ();
- for (list<std::shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
-
- list<shared_ptr<Reel> > reels = (*i)->reels ();
- for (list<shared_ptr<Reel> >::iterator j = reels.begin(); j != reels.end(); ++j) {
-
- if ((*j)->main_subtitle()) {
- (*j)->main_subtitle()->asset()->write ((*j)->main_subtitle()->asset()->file().get());
+ for (auto i: dcp->cpls()) {
+ for (auto j: i->reels()) {
+ if (j->main_subtitle()) {
+ j->main_subtitle()->asset()->write(j->main_subtitle()->asset()->file().get());
}
}
}