Browse Source

Replace == null with is null

af/merge-core
Jason Nelson 8 years ago
parent
commit
9a1201c6eb
  1. 2
      src/ImageSharp/Formats/Png/PngEncoderCore.cs
  2. 2
      src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
  3. 2
      src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs

2
src/ImageSharp/Formats/Png/PngEncoderCore.cs

@ -237,7 +237,7 @@ namespace SixLabors.ImageSharp.Formats.Png
}
// Use the metadata to determine what quantization depth to use if no quantizer has been set.
if (this.quantizer == null)
if (this.quantizer is null)
{
this.quantizer = new WuQuantizer(ImageMaths.GetColorCountForBitDepth(bits));
}

2
src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs

@ -372,7 +372,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
private void AddInvalidTag(ExifTag tag)
{
if (this.invalidTags == null)
if (this.invalidTags is null)
{
this.invalidTags = new List<ExifTag>();
}

2
src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs

@ -95,7 +95,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
base.BeforeFrameApply(source, sourceRectangle, configuration);
// Lazy init paletteVector:
if (this.paletteVector == null)
if (this.paletteVector is null)
{
this.paletteVector = new Vector4[this.Palette.Length];
PixelOperations<TPixel>.Instance.ToScaledVector4(configuration, this.Palette, this.paletteVector);

Loading…
Cancel
Save