summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-16 13:05:08 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-22 17:01:13 +0200
commit85e3b64892f17c8087dd242e5eeb51b5f17a74aa (patch)
treef96f03cc3dfd0cbf5e254a954c3d9a913d397e6d /src
parent55f8fdf0aa397324e08157ff29512506e2cce243 (diff)
downloadjustbuild-85e3b64892f17c8087dd242e5eeb51b5f17a74aa.tar.gz
Use a fixed HashFunction in Compatibility
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/compatibility/compatibility.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildtool/compatibility/compatibility.hpp b/src/buildtool/compatibility/compatibility.hpp
index 6b3843aa..e2eecb11 100644
--- a/src/buildtool/compatibility/compatibility.hpp
+++ b/src/buildtool/compatibility/compatibility.hpp
@@ -57,10 +57,9 @@ class Compatibility {
return it->second;
}
}
- // This is only used in compatible mode. Therefore, the default hash
- // function produces the compatible hash.
- auto compatible_hash =
- HashFunction::Instance().ComputeHash(data).HexString();
+ // This is only used in compatible mode.
+ HashFunction const hash_function{HashFunction::JustHash::Compatible};
+ auto compatible_hash = hash_function.ComputeHash(data).HexString();
std::unique_lock lock_{Instance().mutex_};
Instance().git_to_compatible_[git_hash] = compatible_hash;
Instance().compatible_to_git_[compatible_hash] = {git_hash, repo};