#include "asset_map.h"
#include "compose.hpp"
#include "dcp_assert.h"
+#include "equality_options.h"
#include "exceptions.h"
#include "pkl.h"
#include "raw_convert.h"
bool
-Asset::equals (std::shared_ptr<const Asset> other, EqualityOptions, NoteHandler note) const
+Asset::equals(std::shared_ptr<const Asset> other, EqualityOptions const& 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;
Asset::set_file (path file) const
{
_file = absolute (file);
- _hash = boost::optional<string>();
+ _hash = optional<string>();
}
{
_hash = hash;
}
+
+
+void
+Asset::unset_hash()
+{
+ _hash = optional<string>();
+}
+