Fix IDE0038

This commit is contained in:
RoosterDragon
2023-02-19 11:28:54 +00:00
committed by Gustas
parent 71ce515d6d
commit 5b70d344cc
15 changed files with 33 additions and 29 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenRA
public override int GetHashCode() { return M11 ^ M22 ^ M33 ^ M44; }
public bool Equals(Int32Matrix4x4 other) { return other == this; }
public override bool Equals(object obj) { return obj is Int32Matrix4x4 && Equals((Int32Matrix4x4)obj); }
public override bool Equals(object obj) { return obj is Int32Matrix4x4 matrix && Equals(matrix); }
public override string ToString()
{

View File

@@ -116,7 +116,7 @@ namespace OpenRA.Primitives
public static bool operator !=(LongBitSet<T> me, LongBitSet<T> other) { return !(me == other); }
public bool Equals(LongBitSet<T> other) { return other == this; }
public override bool Equals(object obj) { return obj is LongBitSet<T> && Equals((LongBitSet<T>)obj); }
public override bool Equals(object obj) { return obj is LongBitSet<T> set && Equals(set); }
public override int GetHashCode() { return bits.GetHashCode(); }
public bool IsEmpty => bits == 0;

View File

@@ -72,7 +72,7 @@ namespace OpenRA
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public bool Equals(float2 other) { return this == other; }
public override bool Equals(object obj) { return obj is float2 && Equals((float2)obj); }
public override bool Equals(object obj) { return obj is float2 vec && Equals(vec); }
public override string ToString() { return X + "," + Y; }

View File

@@ -37,7 +37,7 @@ namespace OpenRA
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public bool Equals(int2 other) { return this == other; }
public override bool Equals(object obj) { return obj is int2 && Equals((int2)obj); }
public override bool Equals(object obj) { return obj is int2 vec && Equals(vec); }
public override string ToString() { return X + "," + Y; }