瀏覽代碼

Use == instead of Object.Equals to avoid closure allocation

cvium 3 年之前
父節點
當前提交
91f3ce3109
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      MediaBrowser.Controller/Entities/BaseItem.cs

+ 1 - 1
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2739,7 +2739,7 @@ namespace MediaBrowser.Controller.Entities
         }
         }
 
 
         /// <inheritdoc />
         /// <inheritdoc />
-        public bool Equals(BaseItem other) => Equals(Id, other?.Id);
+        public bool Equals(BaseItem other) => Id == other?.Id;
 
 
         /// <inheritdoc />
         /// <inheritdoc />
         public override int GetHashCode() => HashCode.Combine(Id);
         public override int GetHashCode() => HashCode.Combine(Id);