From 8e3a187e1ac854c734b5db2307e4d9c9f6183815 Mon Sep 17 00:00:00 2001 From: zivmaor Date: Mon, 25 Nov 2024 18:35:08 +0200 Subject: [PATCH] Minor code improvement --- UndertaleModTool/Converters/CodeViewConverter.cs | 2 +- UndertaleModTool/Converters/FilteredViewConverter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UndertaleModTool/Converters/CodeViewConverter.cs b/UndertaleModTool/Converters/CodeViewConverter.cs index 04e77b669..80c722031 100644 --- a/UndertaleModTool/Converters/CodeViewConverter.cs +++ b/UndertaleModTool/Converters/CodeViewConverter.cs @@ -14,7 +14,7 @@ protected override Predicate CreateFilter() return (obj) => { if (obj is UndertaleCode code && - code.ParentEntry != null && + code.ParentEntry is not null && Settings.Instance.HideChildCodeEntries) return false; return baseFilter(obj); diff --git a/UndertaleModTool/Converters/FilteredViewConverter.cs b/UndertaleModTool/Converters/FilteredViewConverter.cs index 73320d566..465217f14 100644 --- a/UndertaleModTool/Converters/FilteredViewConverter.cs +++ b/UndertaleModTool/Converters/FilteredViewConverter.cs @@ -45,7 +45,7 @@ protected virtual Predicate CreateFilter() public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - if (value == null) + if (value is null) return null; ICollectionView filteredView = CollectionViewSource.GetDefaultView(value); filteredView.Filter = CreateFilter();