Better equality-failure error messages.
authorCarl Hetherington <cth@carlh.net>
Sat, 21 Nov 2020 01:32:08 +0000 (02:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 21 Nov 2020 01:32:08 +0000 (02:32 +0100)
src/reel.cc

index 29ce9038755c26ccce0bd8196ea4c9456a4ec231..918349c1a0c8ddbfb06b54ccc461f791d8c90ad4 100644 (file)
@@ -185,7 +185,13 @@ Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHand
                return false;
        }
 
-       if (_main_markers && (!other->_main_markers || !_main_markers->equals (other->_main_markers, opt, note))) {
+       if ((_main_markers && !other->_main_markers) || (!_main_markers && other->_main_markers)) {
+               note (DCP_ERROR, "Reel: one has markers and the other does not");
+               return false;
+       }
+
+       if (_main_markers && !_main_markers->equals(other->_main_markers, opt, note)) {
+               note (DCP_ERROR, "Reel: marker assets differ");
                return false;
        }