diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-05-05 12:37:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-05 13:37:36 +0200 |
| commit | f2c10471bf00263adc6411b38db60ba931d0ec15 (patch) | |
| tree | 7f63cfc7a6def01bc758e24cf18217d1b8dcc883 /MediaBrowser.Controller/Entities/Photo.cs | |
| parent | 18d799b22a2bd54bb99c5a99edcbd2edfa6887c4 (diff) | |
Code Clean up: Use Pattern Matching (#5838)
Co-authored-by: Cody Robibero <cody@robibe.ro>
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
Diffstat (limited to 'MediaBrowser.Controller/Entities/Photo.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Photo.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/Photo.cs b/MediaBrowser.Controller/Entities/Photo.cs index 2fc66176f6..0f82f742fd 100644 --- a/MediaBrowser.Controller/Entities/Photo.cs +++ b/MediaBrowser.Controller/Entities/Photo.cs @@ -24,8 +24,7 @@ namespace MediaBrowser.Controller.Entities var parents = GetParents(); foreach (var parent in parents) { - var photoAlbum = parent as PhotoAlbum; - if (photoAlbum != null) + if (parent is PhotoAlbum photoAlbum) { return photoAlbum; } |
