mirror of https://github.com/SixLabors/ImageSharp
Browse Source
The `EnumUtils.Parse` method used to use the non-generic `Enum.GetValues` method to do its job, which is unsafe and produces AOT warnings. This PR refactors it to use `Enum.IsDefined` instead, which does not allocate. I also added asserts to methods in `EnumUtils` that ensure we use them with int-sized enums.pull/2200/head
1 changed files with 9 additions and 8 deletions
Loading…
Reference in new issue