Skip to content

Commit

Permalink
warning nullable GetHashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
awcullen committed Oct 31, 2020
1 parent 61b6f15 commit 0ebc01d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion UaClient/ServiceModel/Ua/ExpandedNodeId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public override int GetHashCode()
{
int hashCode = -641591048;
hashCode = hashCode * -1521134295 + EqualityComparer<NodeId>.Default.GetHashCode(NodeId);
hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(NamespaceUri);
if (NamespaceUri != null) hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(NamespaceUri);
hashCode = hashCode * -1521134295 + ServerIndex.GetHashCode();
return hashCode;
}
Expand Down
4 changes: 2 additions & 2 deletions UaClient/ServiceModel/Ua/LocalizedText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public bool Equals(LocalizedText? other)
public override int GetHashCode()
{
int hashCode = 670029253;
hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Text);
hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Locale);
if (Text != null) hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Text);
if (Locale != null) hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Locale);
return hashCode;
}

Expand Down
2 changes: 1 addition & 1 deletion UaClient/ServiceModel/Ua/QualifiedName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public bool Equals(QualifiedName? other)
public override int GetHashCode()
{
int hashCode = 978021522;
hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Name);
if (Name != null) hashCode = hashCode * -1521134295 + EqualityComparer<string?>.Default.GetHashCode(Name);
hashCode = hashCode * -1521134295 + NamespaceIndex.GetHashCode();
return hashCode;
}
Expand Down

0 comments on commit 0ebc01d

Please sign in to comment.