diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-11 00:16:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:23 +0100 |
| commit | d95eacd3851a20e52202465ec22b4f72a4983dc8 (patch) | |
| tree | 1dfc1092ae7d2e6b6b7c313ad808415f578d9712 /examples | |
| parent | cbee0d077e698541afcea82a95bafcea5245ab89 (diff) | |
Replace std::list with std::vector in the API.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/read_dcp.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/read_dcp.cc b/examples/read_dcp.cc index 6a36d009..9c6c307a 100644 --- a/examples/read_dcp.cc +++ b/examples/read_dcp.cc @@ -58,21 +58,21 @@ main () } std::cout << "DCP has " << dcp.cpls().size() << " CPLs.\n"; - std::list<std::shared_ptr<dcp::Asset> > assets = dcp.assets (); + auto assets = dcp.assets (); std::cout << "DCP has " << assets.size() << " assets.\n"; - for (std::list<std::shared_ptr<dcp::Asset> >::const_iterator i = assets.begin(); i != assets.end(); ++i) { - if (std::dynamic_pointer_cast<dcp::MonoPictureAsset> (*i)) { + for (auto i: assets) { + if (std::dynamic_pointer_cast<dcp::MonoPictureAsset>(i)) { std::cout << "2D picture\n"; - } else if (std::dynamic_pointer_cast<dcp::StereoPictureAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::StereoPictureAsset>(i)) { std::cout << "3D picture\n"; - } else if (std::dynamic_pointer_cast<dcp::SoundAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::SoundAsset>(i)) { std::cout << "Sound\n"; - } else if (std::dynamic_pointer_cast<dcp::SubtitleAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::SubtitleAsset>(i)) { std::cout << "Subtitle\n"; - } else if (std::dynamic_pointer_cast<dcp::CPL> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::CPL>(i)) { std::cout << "CPL\n"; } - std::cout << "\t" << (*i)->file()->leaf().string() << "\n"; + std::cout << "\t" << i->file()->leaf().string() << "\n"; } /* Take the first CPL */ |
