From 945d78bc4fd6e99c39f51ad46be26c8b9707464f Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 25 Aug 2012 20:54:10 +0000 Subject: [PATCH] Hash: Avoid type punning warning. [SVN r80217] --- include/boost/functional/hash/detail/hash_float.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/functional/hash/detail/hash_float.hpp b/include/boost/functional/hash/detail/hash_float.hpp index 7ccfb80..3edc6ab 100644 --- a/include/boost/functional/hash/detail/hash_float.hpp +++ b/include/boost/functional/hash/detail/hash_float.hpp @@ -98,8 +98,7 @@ namespace boost int>::type ) { - boost::uint32_t* ptr = (boost::uint32_t*)&v; - return (std::size_t) *ptr; + return hash_binary((char*) &v, 4); }