Skip to content

Performance. Unnecessary boxing in enum comparison.  #862

Closed

Description

@JimBobSquarePants

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

There's a few places in the code base (most notably png and gif formats) where I've incorrectly used enum.Equals(object). We should remove the boxing allocation by using enum == enum instead.

  • ImageSharp version:
  • Other ImageSharp packages and versions: 1.0.0-Beta6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions