Browse Source

Use GetHashCode when combining int values

af/merge-core
Jason Nelson 8 years ago
parent
commit
a0e6fa45cd
  1. 2
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs
  2. 2
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs
  3. 2
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
  4. 2
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs

2
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs

@ -156,7 +156,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
unchecked
{
int hashCode = (int)this.Type;
int hashCode = this.Type.GetHashCode();
hashCode = HashHelpers.Combine(hashCode, this.G.GetHashCode());
hashCode = HashHelpers.Combine(hashCode, this.A.GetHashCode());
hashCode = HashHelpers.Combine(hashCode, this.B.GetHashCode());

2
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs

@ -74,7 +74,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
public override int GetHashCode()
{
return HashHelpers.Combine(
(int)this.CurveType,
this.CurveType.GetHashCode(),
this.XyzValues.GetHashCode(),
this.ResponseArrays.GetHashCode());
}

2
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs

@ -112,7 +112,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
return HashHelpers.Combine(
base.GetHashCode(),
(int)this.ColorantType,
this.ColorantType.GetHashCode(),
this.ChannelValues.GetHashCode());
}

2
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs

@ -90,7 +90,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
base.GetHashCode(),
this.IlluminantXyz.GetHashCode(),
this.SurroundXyz.GetHashCode(),
(int)this.Illuminant);
this.Illuminant.GetHashCode());
}
}
}

Loading…
Cancel
Save