diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-27 19:26:31 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-27 19:26:31 +0000 |
commit | 1eab70e16f0e0d5531f3babfea2062c82f6362e1 (patch) | |
tree | a1ea1930e585b9356c6e089465baa969bb6919bb /utils/hash.h | |
parent | 6ddaff1341e565dd91dca7ea763d0ea4d897f4c7 (diff) |
compiles
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@626 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils/hash.h')
-rwxr-xr-x | utils/hash.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/hash.h b/utils/hash.h index 17f150ff..2062578f 100755 --- a/utils/hash.h +++ b/utils/hash.h @@ -32,9 +32,9 @@ const unsigned GOLDEN_MEAN_FRACTION=2654435769U; template <class C> struct murmur_hash { - typedef MurmurInt return_type; + typedef MurmurInt result_type; typedef C /*const&*/ argument_type; - return_type operator()(argument_type const& c) const { + result_type operator()(argument_type const& c) const { return MurmurHash((void*)&c,sizeof(c)); } }; @@ -43,9 +43,9 @@ struct murmur_hash template <> struct murmur_hash<std::string> { - typedef MurmurInt return_type; + typedef MurmurInt result_type; typedef std::string /*const&*/ argument_type; - return_type operator()(argument_type const& c) const { + result_type operator()(argument_type const& c) const { return MurmurHash(c.data(),c.size()); } }; @@ -54,9 +54,9 @@ struct murmur_hash<std::string> template <class C> struct murmur_hash_array { - typedef MurmurInt return_type; + typedef MurmurInt result_type; typedef C /*const&*/ argument_type; - return_type operator()(argument_type const& c) const { + result_type operator()(argument_type const& c) const { return MurmurHash(&*c.begin(),c.size()*sizeof(*c.begin())); } }; |