Skip to content

Commit b484cc8

Browse files
committed
specify StringComparison explicitly
1 parent 83eb0a1 commit b484cc8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Smdn.Fundamental.FourCC/Smdn/FourCC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public bool Equals(FourCC other)
192192
=> other.fourcc == this.fourcc;
193193

194194
public bool Equals(string other)
195-
=> string.Equals(this.ToString(), other);
195+
=> string.Equals(this.ToString(), other, StringComparison.Ordinal);
196196

197197
public bool Equals(byte[] other)
198198
=> (other != null) && other.SequenceEqual(this.ToByteArray());

src/Smdn.Fundamental.Shell/Smdn.OperatingSystem/ShellString.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public bool Equals(string other)
7979
if (other == null)
8080
return false;
8181
else
82-
return string.Equals(this.Raw, other) || string.Equals(this.Expanded, other);
82+
return string.Equals(this.Raw, other, StringComparison.Ordinal) || string.Equals(this.Expanded, other, StringComparison.Ordinal);
8383
}
8484

8585
public static bool operator ==(ShellString x, ShellString y)
@@ -91,7 +91,7 @@ public bool Equals(string other)
9191
return false;
9292
}
9393

94-
return string.Equals(x.Expanded, y.Expanded);
94+
return string.Equals(x.Expanded, y.Expanded, StringComparison.Ordinal);
9595
}
9696

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

0 commit comments

Comments
 (0)