summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-02 09:26:39 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-02 09:26:39 +0100
commit76276c8d9cb6c1337ecdd02f6d7c026f196bba58 (patch)
tree891e9833456046f11e07a0a4667ff6e7a638ddc4
parent4da794a09e4e3114fea02f955e485ae5a5ca2dd7 (diff)
Add Asset::set_hash().
-rw-r--r--src/asset.cc6
-rw-r--r--src/asset.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/asset.cc b/src/asset.cc
index 60d3aab3..052f7328 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -145,3 +145,9 @@ Asset::set_file (boost::filesystem::path file) const
_file = boost::filesystem::absolute (file);
_hash = optional<string> ();
}
+
+void
+Asset::set_hash (string hash)
+{
+ _hash = hash;
+}
diff --git a/src/asset.h b/src/asset.h
index 7adf0090..a67af741 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -79,6 +79,8 @@ public:
/** @return the hash of this asset's file */
std::string hash (boost::function<void (float)> progress = 0) const;
+ void set_hash (std::string hash);
+
protected:
/** The most recent disk file used to read or write this asset; may be empty */