From 76276c8d9cb6c1337ecdd02f6d7c026f196bba58 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 2 Jun 2016 09:26:39 +0100 Subject: Add Asset::set_hash(). --- src/asset.cc | 6 ++++++ src/asset.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'src') 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 (); } + +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 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 */ -- cgit v1.2.3