Explorar el Código

misc: chore: fix some compile warnings

Evan Husted hace 1 año
padre
commit
27993b789f

+ 3 - 3
src/Ryujinx/UI/Helpers/PlayabilityStatusConverter.cs

@@ -12,8 +12,8 @@ namespace Ryujinx.Ava.UI.Helpers
         private static readonly Lazy<PlayabilityStatusConverter> _shared = new(() => new());
         public static PlayabilityStatusConverter Shared => _shared.Value;
 
-        public object Convert(object? value, Type _, object? __, CultureInfo ___) =>
-            value.Cast<LocaleKeys>() switch
+        public object Convert(object value, Type _, object __, CultureInfo ___)
+            => value.Cast<LocaleKeys>() switch
             {
                 LocaleKeys.CompatibilityListNothing or 
                     LocaleKeys.CompatibilityListBoots or 
@@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Helpers
                 _ => Brushes.ForestGreen
             };
 
-        public object ConvertBack(object? value, Type _, object? __, CultureInfo ___) 
+        public object ConvertBack(object value, Type _, object __, CultureInfo ___)
             => throw new NotSupportedException();
     }
 }

+ 4 - 1
src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs

@@ -741,7 +741,10 @@ namespace Ryujinx.Ava.UI.ViewModels
             Applications.ToObservableChangeSet()
                 .Filter(Filter)
                 .Sort(GetComparer())
-                .Bind(out _appsObservableList).AsObservableList();
+#pragma warning disable MVVMTK0034
+                .Bind(out _appsObservableList)
+#pragma warning enable MVVMTK0034
+                .AsObservableList();
 
             OnPropertyChanged(nameof(AppsObservableList));
         }

+ 1 - 2
src/Ryujinx/Utilities/Compat/CompatibilityCsv.cs

@@ -3,7 +3,6 @@ using nietras.SeparatedValues;
 using Ryujinx.Ava.Common.Locale;
 using Ryujinx.Common.Logging;
 using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Reflection;
@@ -11,7 +10,7 @@ using System.Text;
 
 namespace Ryujinx.Ava.Utilities.Compat
 {
-    public struct ColumnIndices(Func<string, int> getIndex)
+    public struct ColumnIndices(Func<ReadOnlySpan<char>, int> getIndex)
     {
         public const string TitleIdCol = "\"title_id\"";
         public const string GameNameCol = "\"game_name\"";

+ 1 - 1
src/Ryujinx/Utilities/Compat/CompatibilityList.axaml.cs

@@ -42,7 +42,7 @@ namespace Ryujinx.Ava.Utilities.Compat
             InitializeComponent();
         }
 
-        private void TextBox_OnTextChanged(object? sender, TextChangedEventArgs e)
+        private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)
         {
             if (DataContext is not CompatibilityViewModel cvm)
                 return;