Fix IDE0041

This commit is contained in:
RoosterDragon
2023-02-19 11:59:16 +00:00
committed by Pavel Penev
parent 10def52ad9
commit 4991f2f892
2 changed files with 5 additions and 2 deletions

View File

@@ -171,6 +171,9 @@ dotnet_diagnostic.IDE0036.severity = warning
# Raise a warning on build when default access modifiers are explicitly specified. # Raise a warning on build when default access modifiers are explicitly specified.
dotnet_diagnostic.IDE0040.severity = warning dotnet_diagnostic.IDE0040.severity = warning
# Use 'is null' check.
dotnet_diagnostic.IDE0041.severity = warning
# Make field readonly. # Make field readonly.
dotnet_diagnostic.IDE0044.severity = warning dotnet_diagnostic.IDE0044.severity = warning

View File

@@ -274,7 +274,7 @@ namespace OpenRA.Mods.Common.Traits
public bool Equals(EditorActorPreview other) public bool Equals(EditorActorPreview other)
{ {
if (ReferenceEquals(null, other)) if (other is null)
return false; return false;
if (ReferenceEquals(this, other)) if (ReferenceEquals(this, other))
return true; return true;
@@ -284,7 +284,7 @@ namespace OpenRA.Mods.Common.Traits
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
if (ReferenceEquals(null, obj)) if (obj is null)
return false; return false;
if (ReferenceEquals(this, obj)) if (ReferenceEquals(this, obj))
return true; return true;