From 988f570dc4ddd79a166ca8cbc184b2938ed2fefc Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sun, 26 Jun 2022 02:49:05 -0400 Subject: [PATCH] Remove unused property from ImageConverter (#71294) --- .../src/System/Drawing/ImageConverter.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/ImageConverter.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/ImageConverter.cs index 0223a3bfd6168..286ccabcac9eb 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/ImageConverter.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/ImageConverter.cs @@ -15,10 +15,6 @@ namespace System.Drawing { public class ImageConverter : TypeConverter { - private static ReadOnlySpan PBrush => "PBrush"u8; - - private static ReadOnlySpan BMBytes => "BM"u8; - public override bool CanConvertFrom(ITypeDescriptorContext? context, Type? sourceType) { return sourceType == typeof(byte[]) || sourceType == typeof(Icon); @@ -146,7 +142,7 @@ public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContex // pHeader.signature will always be 0x1c15. // "PBrush" should be the 6 chars after position 12 as well. if (rawData.Length <= headersize + 18 || - !rawData.Slice(headersize + 12, 6).SequenceEqual(PBrush)) + !rawData.Slice(headersize + 12, 6).SequenceEqual("PBrush"u8)) { return null; }