From a57bcd17abee9c9f60653f27d26a46b99f46df8b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 12 Jul 2024 14:25:10 +0200 Subject: Use a fixed HashFunction in Tree --- src/buildtool/common/tree.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/buildtool/common/tree.hpp') diff --git a/src/buildtool/common/tree.hpp b/src/buildtool/common/tree.hpp index 06c2e7d5..2f33bfe0 100644 --- a/src/buildtool/common/tree.hpp +++ b/src/buildtool/common/tree.hpp @@ -85,8 +85,10 @@ class Tree { } static auto ComputeId(inputs_t const& inputs) -> std::string { - return HashFunction::Instance() - .ComputeHash(ComputeDescription(inputs).dump()) + // The type of HashFunction is irrelevant here. It is used for + // identification of trees. SHA256 is used. + HashFunction const hash_function{HashFunction::JustHash::Compatible}; + return hash_function.ComputeHash(ComputeDescription(inputs).dump()) .HexString(); } }; -- cgit v1.2.3