Simplify Equals() logic in BossFightEnum
This commit is contained in:
parent
ce1b59d51f
commit
d2c4234943
@ -88,16 +88,8 @@ namespace rabi_splitter_WPF
|
|||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
var otherValue = obj as BossFight;
|
var otherValue = obj as BossFight;
|
||||||
|
if (otherValue == null) return false;
|
||||||
if (otherValue == null)
|
return _value.Equals(otherValue.Value);
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var typeMatches = GetType().Equals(obj.GetType());
|
|
||||||
var valueMatches = _value.Equals(otherValue.Value);
|
|
||||||
|
|
||||||
return typeMatches && valueMatches;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user