Simplify Equals() logic in BossFightEnum

This commit is contained in:
wcko87 2017-05-09 09:26:39 +08:00
parent ce1b59d51f
commit d2c4234943

View File

@ -88,16 +88,8 @@ namespace rabi_splitter_WPF
public override bool Equals(object obj)
{
var otherValue = obj as BossFight;
if (otherValue == null)
{
return false;
}
var typeMatches = GetType().Equals(obj.GetType());
var valueMatches = _value.Equals(otherValue.Value);
return typeMatches && valueMatches;
if (otherValue == null) return false;
return _value.Equals(otherValue.Value);
}
public override int GetHashCode()