diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-08-01 17:44:23 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-11 14:52:07 +0200 |
commit | 2bc6d309c00161b2315b9f98645810699fff3126 (patch) | |
tree | 8185d375463e79b39485448920fa68cca2a206a2 /src/buildtool/common/artifact_description.hpp | |
parent | abae1d3c8032fec872bda44de7f7d754654cf201 (diff) | |
download | justbuild-2bc6d309c00161b2315b9f98645810699fff3126.tar.gz |
Use HashFunction::Type to deserialize ArtifactDescription
Diffstat (limited to 'src/buildtool/common/artifact_description.hpp')
-rw-r--r-- | src/buildtool/common/artifact_description.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buildtool/common/artifact_description.hpp b/src/buildtool/common/artifact_description.hpp index 53d3adcc..c63a2dec 100644 --- a/src/buildtool/common/artifact_description.hpp +++ b/src/buildtool/common/artifact_description.hpp @@ -23,6 +23,7 @@ #include "src/buildtool/common/artifact.hpp" #include "src/buildtool/common/artifact_digest.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/file_system/object_type.hpp" class ArtifactDescription final { @@ -65,7 +66,8 @@ class ArtifactDescription final { return std::holds_alternative<Tree>(data_); } - [[nodiscard]] static auto FromJson(nlohmann::json const& json) noexcept + [[nodiscard]] static auto FromJson(HashFunction::Type hash_type, + nlohmann::json const& json) noexcept -> std::optional<ArtifactDescription>; [[nodiscard]] auto ToJson() const noexcept -> nlohmann::json; |