Skip to content

Commit

Permalink
imp - Don't compare raw values in PropertyInfo
Browse files Browse the repository at this point in the history
---

We need not to compare the raw values in the PropertyInfo instance as ArgumentInfo already processes these values, and that the Value argument basically holds the same amount of information as the Arguments property.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Oct 8, 2024
1 parent 4dae9c0 commit dd04ae5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions VisualCard/Parsers/Arguments/PropertyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public bool Equals(PropertyInfo? source, PropertyInfo? target)

// Check all the properties
return
source.rawValue == target.rawValue &&
source.prefix == target.prefix &&
source.group == target.group &&
PartComparison.CompareLists(source.arguments, target.arguments)
Expand All @@ -109,8 +108,7 @@ public override bool Equals(object? obj) =>
/// <inheritdoc/>
public override int GetHashCode()
{
int hashCode = -1293333806;
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(rawValue);
int hashCode = 106740708;
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(prefix);
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(group);
hashCode = hashCode * -1521134295 + EqualityComparer<ArgumentInfo[]>.Default.GetHashCode(arguments);
Expand Down

0 comments on commit dd04ae5

Please sign in to comment.