A better fix, using operator->()

This commit is contained in:
Laurent Rineau 2015-07-14 18:02:40 +02:00
parent 2591e6cc7d
commit c774546e1b
1 changed files with 4 additions and 4 deletions

View File

@ -1129,7 +1129,7 @@ namespace internal {
bool operator==(const CC_iterator<DSC, Const1> &rhs,
const CC_iterator<DSC, Const2> &lhs)
{
return &*rhs == &*lhs;
return rhs.operator->() == lhs.operator->();
}
template < class DSC, bool Const1, bool Const2 >
@ -1137,7 +1137,7 @@ namespace internal {
bool operator!=(const CC_iterator<DSC, Const1> &rhs,
const CC_iterator<DSC, Const2> &lhs)
{
return &*rhs != &*lhs;
return rhs.operator->() != lhs.operator->();
}
// Comparisons with NULL are part of CGAL's Handle concept...
@ -1147,7 +1147,7 @@ namespace internal {
Nullptr_t CGAL_assertion_code(n))
{
CGAL_assertion( n == NULL);
return rhs == CC_iterator<DSC, Const>();
return rhs.operator->() == NULL;
}
template < class DSC, bool Const >
@ -1156,7 +1156,7 @@ namespace internal {
Nullptr_t CGAL_assertion_code(n))
{
CGAL_assertion( n == NULL);
return rhs != CC_iterator<DSC, Const>();
return rhs.operator->() != NULL;
}
} // namespace internal