From d95fe7675e20eaee86b8e804469e6db83265a005 Mon Sep 17 00:00:00 2001 From: Clark Barrett Date: Tue, 21 Apr 2015 16:34:15 -0700 Subject: Changes needed to compile at Google, plus some bug fixes from Google. --- src/prop/bvminisat/mtl/Map.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/prop/bvminisat') diff --git a/src/prop/bvminisat/mtl/Map.h b/src/prop/bvminisat/mtl/Map.h index 8bd5659bc..4e61d6582 100644 --- a/src/prop/bvminisat/mtl/Map.h +++ b/src/prop/bvminisat/mtl/Map.h @@ -29,16 +29,17 @@ namespace BVMinisat { // Default hash/equals functions // +static inline uint32_t hash(uint32_t x){ return x; } +static inline uint32_t hash(uint64_t x){ return (uint32_t)x; } +static inline uint32_t hash(int32_t x) { return (uint32_t)x; } +static inline uint32_t hash(int64_t x) { return (uint32_t)x; } + template struct Hash { uint32_t operator()(const K& k) const { return hash(k); } }; template struct Equal { bool operator()(const K& k1, const K& k2) const { return k1 == k2; } }; template struct DeepHash { uint32_t operator()(const K* k) const { return hash(*k); } }; template struct DeepEqual { bool operator()(const K* k1, const K* k2) const { return *k1 == *k2; } }; -static inline uint32_t hash(uint32_t x){ return x; } -static inline uint32_t hash(uint64_t x){ return (uint32_t)x; } -static inline uint32_t hash(int32_t x) { return (uint32_t)x; } -static inline uint32_t hash(int64_t x) { return (uint32_t)x; } //================================================================================================= -- cgit v1.2.3