Vorspire
Knight
Reported as active bug from 605 -> SVN 665 (Current)
The error(s):
How to provoke the error (example):
Using either the == or != operator on a Point3D will cause the errors.
Geometry.cs / Lines 327 to 351:
Remove/comment the code in red to fix this issue.
Same again for Point2D...
Geometry.cs / Lines 123 to 147:
From what I assume, the old operator overloads were not removed.
I think there's a dev somewhere using notepad
The error(s):
Code:
The call is ambiguous between the following methods or properties:
'Server.Point3D.operator ==(Server.Point3D, Server.Point3D)' and 'Server.Point3D.operator ==(Server.Point3D, Server.IPoint3D)'
The call is ambiguous between the following methods or properties:
'Server.Point3D.operator !=(Server.Point3D, Server.Point3D)' and 'Server.Point3D.operator !=(Server.Point3D, Server.IPoint3D)'
How to provoke the error (example):
Rich (BB code):
Point3D p1 = Point3D.Zero;
Point3D p2 = Point3D.Zero;
if( p1 != null && p1 == p2 )
{ return; }
Using either the == or != operator on a Point3D will cause the errors.
Geometry.cs / Lines 327 to 351:
Rich (BB code):
public static bool operator ==( Point3D l, Point3D r )
{
return l.m_X == r.m_X && l.m_Y == r.m_Y && l.m_Z == r.m_Z;
}
public static bool operator !=( Point3D l, Point3D r )
{
return l.m_X != r.m_X || l.m_Y != r.m_Y || l.m_Z != r.m_Z;
}
public static bool operator ==( Point3D l, IPoint3D r )
{
if ( Object.ReferenceEquals( r, null ) )
return false;
return l.m_X == r.X && l.m_Y == r.Y && l.m_Z == r.Z;
}
public static bool operator !=( Point3D l, IPoint3D r )
{
if ( Object.ReferenceEquals( r, null ) )
return false;
return l.m_X != r.X || l.m_Y != r.Y || l.m_Z != r.Z;
}
Same again for Point2D...
Geometry.cs / Lines 123 to 147:
Rich (BB code):
public static bool operator == ( Point2D l, Point2D r )
{
return l.m_X == r.m_X && l.m_Y == r.m_Y;
}
public static bool operator != ( Point2D l, Point2D r )
{
return l.m_X != r.m_X || l.m_Y != r.m_Y;
}
public static bool operator == ( Point2D l, IPoint2D r )
{
if ( Object.ReferenceEquals( r, null ) )
return false;
return l.m_X == r.X && l.m_Y == r.Y;
}
public static bool operator != ( Point2D l, IPoint2D r )
{
if ( Object.ReferenceEquals( r, null ) )
return false;
return l.m_X !=r.X || l.m_Y != r.Y;
}
From what I assume, the old operator overloads were not removed.
I think there's a dev somewhere using notepad