Tweaks to diffing routines.
authorCarl Hetherington <cth@carlh.net>
Sun, 2 Jun 2013 21:16:17 +0000 (22:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 2 Jun 2013 21:16:17 +0000 (22:16 +0100)
src/cpl.cc
src/types.h

index e7eb1ced914355f79964e16feaf884158893a308..fd7056809009efb30ab5c9265f09ed336f49b046 100644 (file)
@@ -256,8 +256,10 @@ CPL::write_to_assetmap (xmlpp::Node* node) const
 bool
 CPL::equals (CPL const & other, EqualityOptions opt, boost::function<void (NoteType, string)> 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;
        }
 
index b1de4a0fc1a499fd4c6748db015781388d313284..edabb9e233b9c9595e704fb5a7831bd003193bc9 100644 (file)
@@ -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;
 };