Before recent changes Asset::_hash would be empty when the equality
checks were run (and Asset::equals() compares them directly).
This mean that differences in asset hash were being ignored, but
are no longer; so now we need this option to restore that behaviour
where required.
bool
-Asset::equals (std::shared_ptr<const Asset> other, EqualityOptions, NoteHandler note) const
+Asset::equals(std::shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
if (_hash != other->_hash) {
- note (NoteType::ERROR, "Asset: hashes differ");
- return false;
+ if (!opt.asset_hashes_can_differ) {
+ note(NoteType::ERROR, "Asset: hashes differ");
+ return false;
+ } else {
+ note(NoteType::NOTE, "Asset: hashes differ");
+ }
}
return true;
bool reel_annotation_texts_can_differ = false;
/** true if <Hash>es in Reels can differ */
bool reel_hashes_can_differ = false;
+ /** true if asset hashes can differ */
+ bool asset_hashes_can_differ = false;
/** true if IssueDate nodes can differ */
bool issue_dates_can_differ = false;
bool load_font_nodes_can_differ = false;