Add Asset::set_hash().
authorCarl Hetherington <cth@carlh.net>
Thu, 2 Jun 2016 08:26:39 +0000 (09:26 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 2 Jun 2016 08:26:39 +0000 (09:26 +0100)
src/asset.cc
src/asset.h

index 60d3aab311d27c8a19c919e351f20ba36aff9e38..052f73284b1e96d1fbe08acafa78c0a6c842a679 100644 (file)
@@ -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;
+}
index 7adf009087d0870abd5ef33d03c14837fabff4cc..a67af741296e356b0e103229ef525562dbbf6fb7 100644 (file)
@@ -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 */