Fix T23::operator== for dimension 0

This commit is contained in:
Mael Rouxel-Labbé 2022-09-02 13:42:33 +02:00
parent d940b5ca7e
commit 7d9d7844b1
2 changed files with 6 additions and 6 deletions

View File

@ -3948,11 +3948,11 @@ operator==(const Triangulation_2<GT, TDS1>& t1,
int dim = t1.dimension();
// Special case for dimension < 1.
// The triangulation is uniquely defined in these cases.
if(dim < 1)
if(dim == -1)
return true;
// Special case for dimension == 1.
if(dim == 1)
// Special case for dimensions 0 and 1.
if(dim < 2)
{
// It's enough to test that the points are the same,
// since the triangulation is uniquely defined in this case.

View File

@ -7286,11 +7286,11 @@ operator==(const Triangulation_3<GT, Tds1, Lds>& t1,
int dim = t1.dimension();
// Special case for dimension < 1.
// The triangulation is uniquely defined in these cases.
if(dim < 1)
if(dim == - 1)
return true;
// Special case for dimension == 1.
if(dim == 1)
// Special case for dimensions 0 and 1.
if(dim < 2)
{
// It's enough to test that the points are the same,
// since the triangulation is uniquely defined in this case.