diff --git a/STL_Extension/include/CGAL/Small_unordered_map.h b/STL_Extension/include/CGAL/Small_unordered_map.h index f5c49f35b06..437b990e2be 100644 --- a/STL_Extension/include/CGAL/Small_unordered_map.h +++ b/STL_Extension/include/CGAL/Small_unordered_map.h @@ -37,8 +37,14 @@ class Small_unordered_map{ mutable std::array occupied; std::array unfreelist; std::array, M> data; - const H hash = {}; + //const H h = {}; + int hash(const K& k)const + { + std::size_t hf = boost::hash()(k.first); + std::size_t hs = boost::hash()(k.second); + return (hf + 1) ^ (419 * (hs + 1)); + } public: Small_unordered_map() diff --git a/STL_Extension/include/CGAL/Time_stamper.h b/STL_Extension/include/CGAL/Time_stamper.h index 904c82b6c98..a9a7e90664a 100644 --- a/STL_Extension/include/CGAL/Time_stamper.h +++ b/STL_Extension/include/CGAL/Time_stamper.h @@ -127,7 +127,8 @@ public: } static std::size_t hash_value(const T* p) { - return reinterpret_cast(p)/sizeof(T); + + return reinterpret_cast(p) >> 5; // sizeof(T); } void reset() {}