Skip to content

Commit

Permalink
specify StringComparison explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Feb 3, 2022
1 parent 83eb0a1 commit b484cc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Smdn.Fundamental.FourCC/Smdn/FourCC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public bool Equals(FourCC other)
=> other.fourcc == this.fourcc;

public bool Equals(string other)
=> string.Equals(this.ToString(), other);
=> string.Equals(this.ToString(), other, StringComparison.Ordinal);

public bool Equals(byte[] other)
=> (other != null) && other.SequenceEqual(this.ToByteArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public bool Equals(string other)
if (other == null)
return false;
else
return string.Equals(this.Raw, other) || string.Equals(this.Expanded, other);
return string.Equals(this.Raw, other, StringComparison.Ordinal) || string.Equals(this.Expanded, other, StringComparison.Ordinal);
}

public static bool operator ==(ShellString x, ShellString y)
Expand All @@ -91,7 +91,7 @@ public bool Equals(string other)
return false;
}

return string.Equals(x.Expanded, y.Expanded);
return string.Equals(x.Expanded, y.Expanded, StringComparison.Ordinal);
}

public static bool operator !=(ShellString x, ShellString y) => !(x == y);
Expand Down

0 comments on commit b484cc8

Please sign in to comment.