Skip to content

Commit df13097

Browse files
Merge pull request #2319 from stefannikolei/stefannikolei/remove_nullable_equals
Removed #nullable disabled
2 parents 271dc99 + dc0d11c commit df13097

File tree

100 files changed

+186
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+186
-285
lines changed

src/ImageSharp/Color/Color.Conversions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;

src/ImageSharp/ColorSpaces/CieLab.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -124,7 +123,7 @@ public CieLab(Vector3 vector, CieXyz whitePoint)
124123
public override string ToString() => FormattableString.Invariant($"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})");
125124

126125
/// <inheritdoc/>
127-
public override bool Equals(object obj) => obj is CieLab other && this.Equals(other);
126+
public override bool Equals(object? obj) => obj is CieLab other && this.Equals(other);
128127

129128
/// <inheritdoc/>
130129
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/CieLch.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -128,7 +127,7 @@ public override int GetHashCode()
128127

129128
/// <inheritdoc/>
130129
[MethodImpl(InliningOptions.ShortMethod)]
131-
public override bool Equals(object obj) => obj is CieLch other && this.Equals(other);
130+
public override bool Equals(object? obj) => obj is CieLch other && this.Equals(other);
132131

133132
/// <inheritdoc/>
134133
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/CieLchuv.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -125,7 +124,7 @@ public CieLchuv(Vector3 vector, CieXyz whitePoint)
125124
public override string ToString() => FormattableString.Invariant($"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})");
126125

127126
/// <inheritdoc/>
128-
public override bool Equals(object obj) => obj is CieLchuv other && this.Equals(other);
127+
public override bool Equals(object? obj) => obj is CieLchuv other && this.Equals(other);
129128

130129
/// <inheritdoc/>
131130
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/CieLuv.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -125,7 +124,7 @@ public CieLuv(Vector3 vector, CieXyz whitePoint)
125124
public override string ToString() => FormattableString.Invariant($"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})");
126125

127126
/// <inheritdoc/>
128-
public override bool Equals(object obj) => obj is CieLuv other && this.Equals(other);
127+
public override bool Equals(object? obj) => obj is CieLuv other && this.Equals(other);
129128

130129
/// <inheritdoc/>
131130
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/CieXyy.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -89,7 +88,7 @@ public CieXyy(Vector3 vector)
8988
public override string ToString() => FormattableString.Invariant($"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})");
9089

9190
/// <inheritdoc/>
92-
public override bool Equals(object obj) => obj is CieXyy other && this.Equals(other);
91+
public override bool Equals(object? obj) => obj is CieXyy other && this.Equals(other);
9392

9493
/// <inheritdoc/>
9594
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/CieXyz.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -92,7 +91,7 @@ public CieXyz(Vector3 vector)
9291
public override string ToString() => FormattableString.Invariant($"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})");
9392

9493
/// <inheritdoc/>
95-
public override bool Equals(object obj) => obj is CieXyz other && this.Equals(other);
94+
public override bool Equals(object? obj) => obj is CieXyz other && this.Equals(other);
9695

9796
/// <inheritdoc/>
9897
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/Cmyk.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Numerics;
65
using System.Runtime.CompilerServices;
@@ -96,7 +95,7 @@ public Cmyk(Vector4 vector)
9695
public override string ToString() => FormattableString.Invariant($"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})");
9796

9897
/// <inheritdoc/>
99-
public override bool Equals(object obj) => obj is Cmyk other && this.Equals(other);
98+
public override bool Equals(object? obj) => obj is Cmyk other && this.Equals(other);
10099

101100
/// <inheritdoc/>
102101
[MethodImpl(InliningOptions.ShortMethod)]

src/ImageSharp/ColorSpaces/Conversion/Implementation/CieXyChromaticityCoordinates.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
using System.Runtime.CompilerServices;
65

@@ -74,7 +73,7 @@ public override string ToString()
7473
=> FormattableString.Invariant($"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})");
7574

7675
/// <inheritdoc/>
77-
public override bool Equals(object obj)
76+
public override bool Equals(object? obj)
7877
=> obj is CieXyChromaticityCoordinates other && this.Equals(other);
7978

8079
/// <inheritdoc/>

src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
3-
#nullable disable
43

54
namespace SixLabors.ImageSharp.ColorSpaces.Conversion;
65

@@ -73,7 +72,7 @@ public RgbPrimariesChromaticityCoordinates(CieXyChromaticityCoordinates r, CieXy
7372
}
7473

7574
/// <inheritdoc/>
76-
public override bool Equals(object obj)
75+
public override bool Equals(object? obj)
7776
{
7877
return obj is RgbPrimariesChromaticityCoordinates other && this.Equals(other);
7978
}

0 commit comments

Comments
 (0)