diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-06 10:47:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-22 01:21:00 +0100 |
| commit | 30dfa051113792305f9704d5a76ffaf57c21063d (patch) | |
| tree | 4a4055b40bfb64ebf5b7509ef81a104db4a52e46 /tools/common.cc | |
| parent | 9cb23adda9ebe6a76992b68db78ccb638348dac1 (diff) | |
Use VerificationNote for non-fatal errors in DCP::read.
Diffstat (limited to 'tools/common.cc')
| -rw-r--r-- | tools/common.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/common.cc b/tools/common.cc index cda6817b..7ae3dae0 100644 --- a/tools/common.cc +++ b/tools/common.cc @@ -39,15 +39,15 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; void -dcp::filter_errors (dcp::DCP::ReadErrors& errors, bool ignore_missing_assets) +dcp::filter_notes (list<dcp::VerificationNote>& notes, bool ignore_missing_assets) { - for (DCP::ReadErrors::iterator i = errors.begin(); i != errors.end(); ) { + for (list<dcp::VerificationNote>::iterator i = notes.begin(); i != notes.end(); ) { - DCP::ReadErrors::iterator tmp = i; + list<dcp::VerificationNote>::iterator tmp = i; ++tmp; - if (ignore_missing_assets && dynamic_pointer_cast<MissingAssetError> (*i)) { - errors.erase (i); + if (ignore_missing_assets && i->code() == dcp::VerificationNote::Code::MISSING_ASSET) { + notes.erase (i); } i = tmp; |
