hash value of handles use directly the address of the node

This commit is contained in:
Sébastien Loriot 2021-05-27 12:36:17 +02:00
parent e3d5fccf5b
commit 18ca811f7f
2 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ namespace internal{
std::size_t
operator()(const H& h)
{
return std::size_t(&*h) /
return std::size_t(h.operator->()) /
sizeof( typename std::iterator_traits<H>::value_type);
}
};

View File

@ -179,7 +179,7 @@ namespace internal {
template <class T, class Alloc>
std::size_t hash_value(const In_place_list_iterator<T,Alloc>& i)
{
T* ptr = &*i;
T* ptr = i.operator->();
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
}
@ -187,7 +187,7 @@ template <class T, class Alloc>
template <class T, class Alloc>
std::size_t hash_value(const In_place_list_const_iterator<T,Alloc>& i)
{
const T* ptr = &*i;
const T* ptr = i.operator->();
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
}
@ -792,7 +792,7 @@ namespace std {
std::size_t operator()(const CGAL::internal::In_place_list_iterator<T, Alloc>& i) const
{
const T* ptr = &*i;
const T* ptr = i.operator->();
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
}
};
@ -803,7 +803,7 @@ namespace std {
std::size_t operator()(const CGAL::internal::In_place_list_const_iterator<T, Alloc>& i) const
{
const T* ptr = &*i;
const T* ptr =i.operator->();
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
}
};