Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit f58740d

Browse files
authored
Merge pull request #173 from UnityTech/yczhang
Fix ValueKey comparison.
2 parents 807f461 + 522e9c8 commit f58740d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Runtime/foundation/key.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ protected Key() {
99
public static Key key(string value) {
1010
return new ValueKey<string>(value);
1111
}
12+
13+
public static bool operator ==(Key left, Key right) {
14+
return Equals(left, right);
15+
}
16+
17+
public static bool operator !=(Key left, Key right) {
18+
return !Equals(left, right);
19+
}
1220
}
1321

1422
public abstract class LocalKey : Key {

0 commit comments

Comments
 (0)