Cell - implement == and != overrides, this might fix some subtle problems in input roll
This commit is contained in:
parent
6604e5dc17
commit
9d87550c2a
|
@ -29,13 +29,28 @@ namespace BizHawk.Client.EmuHawk
|
|||
return Column == cell.Column && RowIndex == cell.RowIndex;
|
||||
}
|
||||
|
||||
return base.Equals(obj);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Column.GetHashCode() + RowIndex.GetHashCode();
|
||||
}
|
||||
|
||||
public static bool operator ==(Cell a, Cell b)
|
||||
{
|
||||
if (ReferenceEquals(a, null))
|
||||
{
|
||||
return ReferenceEquals(b, null);
|
||||
}
|
||||
|
||||
return a.Equals(b);
|
||||
}
|
||||
|
||||
public static bool operator !=(Cell a, Cell b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
}
|
||||
|
||||
internal class SortCell : IComparer<Cell>
|
||||
|
|
Loading…
Reference in New Issue