diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-21 00:07:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-21 00:07:40 +0200 |
| commit | 647771abdbbf52737278e59898063c799b64f22d (patch) | |
| tree | 513ea0a74e2f2a54468cec3a915e56d0eb01f19a | |
| parent | fa5f3a8bf77209da27acc33cf144e2e4500a2600 (diff) | |
Use a BOOST_FOREACH and remove an old #include.
| -rw-r--r-- | src/lib/dcp_content_type.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/dcp_content_type.cc b/src/lib/dcp_content_type.cc index 613ed15a5..9ff903231 100644 --- a/src/lib/dcp_content_type.cc +++ b/src/lib/dcp_content_type.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -24,7 +24,7 @@ #include "dcp_content_type.h" #include "dcpomatic_assert.h" -#include <cassert> +#include <boost/foreach.hpp> #include "i18n.h" @@ -60,9 +60,9 @@ DCPContentType::setup_dcp_content_types () DCPContentType const * DCPContentType::from_isdcf_name (string n) { - for (vector<DCPContentType const *>::const_iterator i = _dcp_content_types.begin(); i != _dcp_content_types.end(); ++i) { - if ((*i)->isdcf_name() == n) { - return *i; + BOOST_FOREACH (DCPContentType const * i, _dcp_content_types) { + if (i->isdcf_name() == n) { + return i; } } |
