From d983d65d8abdef7a71c935d134ab5d8bce3ee858 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Sun, 19 Jul 2020 14:18:23 -0400 Subject: [PATCH] Simplify return statements --- Jellyfin.Drawing.Skia/SkiaEncoder.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Jellyfin.Drawing.Skia/SkiaEncoder.cs b/Jellyfin.Drawing.Skia/SkiaEncoder.cs index 399a7a9b4d..999cad0129 100644 --- a/Jellyfin.Drawing.Skia/SkiaEncoder.cs +++ b/Jellyfin.Drawing.Skia/SkiaEncoder.cs @@ -244,12 +244,7 @@ namespace Jellyfin.Drawing.Skia } } - if (HasDiacritics(path)) - { - return true; - } - - return false; + return HasDiacritics(path); } private string NormalizePath(string path) @@ -349,12 +344,7 @@ namespace Jellyfin.Drawing.Skia if (cropWhitespace) { using var bitmap = Decode(path, forceAnalyzeBitmap, orientation, out origin); - if (bitmap == null) - { - return null; - } - - return CropWhiteSpace(bitmap); + return bitmap == null ? null : CropWhiteSpace(bitmap); } return Decode(path, forceAnalyzeBitmap, orientation, out origin);