X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fkdm_cli.cc;h=ddc77e771323ab515525fa70e47ba8b12002a275;hb=9d1d1cea1cdf17b4cc2208800ca22288f979d3ec;hp=5ea8089674c051377cd045afaf6cc8a95f6d7b12;hpb=96f50dd5e600925488fdd9db1580aa01b026269b;p=dcpomatic.git diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index 5ea808967..ddc77e771 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -257,13 +257,21 @@ from_film ( } - if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OUTSIDE_CERTIFICATE) != period_checks.end()) { + if (find_if( + period_checks.begin(), + period_checks.end(), + [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OUTSIDE_CERTIFICATE; } + ) != period_checks.end()) { throw KDMCLIError( "Some KDMs would have validity periods which are completely outside the recipient certificate periods. Such KDMs are very unlikely to work, so will not be created." ); } - if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OVERLAPS_CERTIFICATE) != period_checks.end()) { + if (find_if( + period_checks.begin(), + period_checks.end(), + [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OVERLAPS_CERTIFICATE; } + ) != period_checks.end()) { out("For some of these KDMs the recipient certificate's validity period will not cover the whole of the KDM validity period. This might cause problems with the KDMs."); }