From d2c4234943c10061241458b154e8d2e699b4d666 Mon Sep 17 00:00:00 2001 From: wcko87 Date: Tue, 9 May 2017 09:26:39 +0800 Subject: [PATCH] Simplify Equals() logic in BossFightEnum --- rabi_splitter_WPF/BossFightEnum.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/rabi_splitter_WPF/BossFightEnum.cs b/rabi_splitter_WPF/BossFightEnum.cs index 865f27e..48856e7 100644 --- a/rabi_splitter_WPF/BossFightEnum.cs +++ b/rabi_splitter_WPF/BossFightEnum.cs @@ -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()