From ceacbae6b36e1425c2e0dd87c73075858f21ec10 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Thu, 7 May 2020 20:22:32 -0400 Subject: Use STL provided uint64_t hash function to speed up Windows build --- mediumlevelilinstruction.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h index b0cfb139..76b4ae61 100644 --- a/mediumlevelilinstruction.h +++ b/mediumlevelilinstruction.h @@ -137,11 +137,10 @@ namespace std #else typedef BinaryNinja::SSAVariable argument_type; #endif - typedef uint32_t result_type; + typedef std::hash::result_type result_type; result_type operator()(argument_type const& value) const { - uint64_t hashTmp = ((uint64_t)value.var.ToIdentifier()) ^ ((uint64_t)value.version << 40); - return (uint32_t)((hashTmp >> 32) ^ (uint32_t)hashTmp); + return std::hash()(((uint64_t)value.var.ToIdentifier()) ^ ((uint64_t)value.version << 40)); } }; -- cgit v1.3.1