Merge pull request #4130 from ScottNZ/lua-wip

Rewrite our Equals implementations
This commit is contained in:
Chris Forbes
2013-11-12 00:05:51 -08:00
12 changed files with 24 additions and 58 deletions

View File

@@ -54,11 +54,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CPos o = (CPos)obj;
return o == this;
var o = obj as CPos?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }

View File

@@ -65,11 +65,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CVec o = (CVec)obj;
return o == this;
var o = obj as CVec?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }