Skip to content

Commit

Permalink
Remove unused property from ImageConverter (#71294)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jun 26, 2022
1 parent a66194c commit 988f570
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ namespace System.Drawing
{
public class ImageConverter : TypeConverter
{
private static ReadOnlySpan<byte> PBrush => "PBrush"u8;

private static ReadOnlySpan<byte> BMBytes => "BM"u8;

public override bool CanConvertFrom(ITypeDescriptorContext? context, Type? sourceType)
{
return sourceType == typeof(byte[]) || sourceType == typeof(Icon);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 988f570

Please sign in to comment.