projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add asset_hashes_can_differ option to the equality checks.
[libdcp.git]
/
src
/
asset.cc
diff --git
a/src/asset.cc
b/src/asset.cc
index d88c690d20fc906f693a570411ba847a181865a6..330bd653082fcb1ff6441322b06c640ee76f7ca7 100644
(file)
--- a/
src/asset.cc
+++ b/
src/asset.cc
@@
-143,11
+143,15
@@
Asset::hash (function<void (float)> progress) const
bool
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) {
{
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;
}
return true;