summaryrefslogtreecommitdiff
path: root/test/rewrite_subs.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-04 14:45:31 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-04 14:45:31 +0000
commite18e48ce04852c5418099a9f1e4c6928eb03cbd7 (patch)
tree916c7f7594e6b0da74162366545d36976f7171c3 /test/rewrite_subs.cc
parent59e8364fd9390d3285e15a5491c7b1876fe9696b (diff)
Make specific DCP CPL class.
Diffstat (limited to 'test/rewrite_subs.cc')
-rw-r--r--test/rewrite_subs.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/rewrite_subs.cc b/test/rewrite_subs.cc
index 73e2776d..6875be0a 100644
--- a/test/rewrite_subs.cc
+++ b/test/rewrite_subs.cc
@@ -17,13 +17,14 @@
*/
-#include <iostream>
#include "dcp.h"
-#include "cpl.h"
+#include "dcp_cpl.h"
#include "reel.h"
#include "subtitle_asset.h"
#include "reel_subtitle_asset.h"
#include "exceptions.h"
+#include <boost/foreach.hpp>
+#include <iostream>
using std::cout;
using std::cerr;
@@ -45,14 +46,10 @@ main (int argc, char* argv[])
DCP* dcp = new DCP (argv[1]);
dcp->read (true);
- list<shared_ptr<CPL> > cpls = dcp->cpls ();
- for (list<boost::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 ());
+ BOOST_FOREACH (shared_ptr<DCPCPL> i, dcp->cpls()) {
+ BOOST_FOREACH (shared_ptr<Reel> j, i->reels()) {
+ if (j->main_subtitle()) {
+ j->main_subtitle()->asset()->write (j->main_subtitle()->asset()->file ());
}
}
}