Merge pull request #468 from Sergio0694/dev/skip-extension-tostring

Skip unnecessary ToString() call to check file extension
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2023-01-14 12:58:22 -08:00
コミット 048c361bd3
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -116,7 +116,7 @@ internal static class WICFormatHelper
/// <exception cref="ArgumentException">Thrown when the input filename doesn't have a valid file extension.</exception>
public static Guid GetForFilename(ReadOnlySpan<char> filename)
{
return Path.GetExtension(filename).ToString() switch
return Path.GetExtension(filename) switch
{
".bmp" => GUID.GUID_ContainerFormatBmp,
".png" => GUID.GUID_ContainerFormatPng,