From aa16dd1b3a50aa402003bc80fa0145d1a845c2cb Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 30 Jan 2024 11:21:30 +0100 Subject: ArtifactDigest: Hashing the object should not take size into account As it is common to use ArtifactDigest objects with a default value of 0, the std::hash implementation should not take the size into account. The is_tree member however should be kept in as it always needs to have a value and has no sensible default. --- src/buildtool/common/artifact_digest.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/common/artifact_digest.hpp b/src/buildtool/common/artifact_digest.hpp index 5b4589cd..1e0405dd 100644 --- a/src/buildtool/common/artifact_digest.hpp +++ b/src/buildtool/common/artifact_digest.hpp @@ -111,7 +111,6 @@ struct hash { -> std::size_t { std::size_t seed{}; hash_combine(&seed, digest.hash_); - hash_combine(&seed, digest.size_); hash_combine(&seed, digest.is_tree_); return seed; } -- cgit v1.2.3