summaryrefslogtreecommitdiff
path: root/src/buildtool/common/tree.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/common/tree.hpp')
-rw-r--r--src/buildtool/common/tree.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/common/tree.hpp b/src/buildtool/common/tree.hpp
index 53333901..55922346 100644
--- a/src/buildtool/common/tree.hpp
+++ b/src/buildtool/common/tree.hpp
@@ -54,13 +54,15 @@ class Tree {
return ArtifactDescription::CreateTree(id_);
}
- [[nodiscard]] static auto FromJson(std::string const& id,
+ [[nodiscard]] static auto FromJson(HashFunction::Type hash_type,
+ std::string const& id,
nlohmann::json const& json)
-> std::optional<Tree::Ptr> {
auto inputs = inputs_t{};
inputs.reserve(json.size());
for (auto const& [path, artifact] : json.items()) {
- auto artifact_desc = ArtifactDescription::FromJson(artifact);
+ auto artifact_desc =
+ ArtifactDescription::FromJson(hash_type, artifact);
if (not artifact_desc) {
return std::nullopt;
}