From 52528d511935d95b1a2f0dbf62bcd2af3a6288ad Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 2 Jun 2013 22:16:17 +0100 Subject: Tweaks to diffing routines. --- src/cpl.cc | 6 ++++-- src/types.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cpl.cc b/src/cpl.cc index e7eb1ced..fd705680 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -256,8 +256,10 @@ CPL::write_to_assetmap (xmlpp::Node* node) const bool CPL::equals (CPL const & other, EqualityOptions opt, boost::function note) const { - if (_name != other._name) { - note (ERROR, "names differ"); + if (_name != other._name && !opt.cpl_names_can_differ) { + stringstream s; + s << "names differ: " << _name << " vs " << other._name << "\n"; + note (ERROR, s.str ()); return false; } diff --git a/src/types.h b/src/types.h index b1de4a0f..edabb9e2 100644 --- a/src/types.h +++ b/src/types.h @@ -100,12 +100,14 @@ struct EqualityOptions { : max_mean_pixel_error (0) , max_std_dev_pixel_error (0) , max_audio_sample_error (0) + , cpl_names_can_differ (false) , mxf_names_can_differ (false) {} double max_mean_pixel_error; double max_std_dev_pixel_error; int max_audio_sample_error; + bool cpl_names_can_differ; bool mxf_names_can_differ; }; -- cgit v1.2.3