mirror of https://github.com/CGAL/cgal
hash value of handles use directly the address of the node
This commit is contained in:
parent
e3d5fccf5b
commit
18ca811f7f
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue