Browse Source

Make IccLut a readonly struct

pull/541/head
Jason Nelson 8 years ago
parent
commit
a7da0fcdf1
  1. 15
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs

15
src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs

@ -9,10 +9,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <summary>
/// Lookup Table
/// </summary>
internal sealed class IccLut : IEquatable<IccLut>
internal readonly struct IccLut : IEquatable<IccLut>
{
/// <summary>
/// Initializes a new instance of the <see cref="IccLut"/> class.
/// Initializes a new instance of the <see cref="IccLut"/> struct.
/// </summary>
/// <param name="values">The LUT values</param>
public IccLut(float[] values)
@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
}
/// <summary>
/// Initializes a new instance of the <see cref="IccLut"/> class.
/// Initializes a new instance of the <see cref="IccLut"/> struct.
/// </summary>
/// <param name="values">The LUT values</param>
public IccLut(ushort[] values)
@ -39,7 +39,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
}
/// <summary>
/// Initializes a new instance of the <see cref="IccLut"/> class.
/// Initializes a new instance of the <see cref="IccLut"/> struct.
/// </summary>
/// <param name="values">The LUT values</param>
public IccLut(byte[] values)
@ -63,12 +63,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/>
public bool Equals(IccLut other)
{
if (other == null)
{
return false;
}
if (ReferenceEquals(this, other))
if (ReferenceEquals(this.Values, other.Values))
{
return true;
}

Loading…
Cancel
Save