From f4fd1867637c5158e9d4860d740d3fe3958c9f1e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 9 Dec 2022 17:48:39 -0500 Subject: [PATCH] Mark more enums as `[Flags]` --- .../HOS/Services/Prepo/Types/PrepoServicePermissionLevel.cs | 5 ++++- Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocketFlags.cs | 3 +++ Ryujinx.Ui.Common/Configuration/ConfigurationLoadResult.cs | 3 +++ Ryujinx.Ui.Common/Configuration/ConfigurationState.cs | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Prepo/Types/PrepoServicePermissionLevel.cs b/Ryujinx.HLE/HOS/Services/Prepo/Types/PrepoServicePermissionLevel.cs index 35774707d..e0db70df6 100644 --- a/Ryujinx.HLE/HOS/Services/Prepo/Types/PrepoServicePermissionLevel.cs +++ b/Ryujinx.HLE/HOS/Services/Prepo/Types/PrepoServicePermissionLevel.cs @@ -1,5 +1,8 @@ -namespace Ryujinx.HLE.HOS.Services.Prepo +using System; + +namespace Ryujinx.HLE.HOS.Services.Prepo { + [Flags] enum PrepoServicePermissionLevel { Admin = -1, diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocketFlags.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocketFlags.cs index ca464c09e..a92a8e2fb 100644 --- a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocketFlags.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocketFlags.cs @@ -1,5 +1,8 @@ +using System; + namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { + [Flags] enum BsdSocketFlags { None = 0, diff --git a/Ryujinx.Ui.Common/Configuration/ConfigurationLoadResult.cs b/Ryujinx.Ui.Common/Configuration/ConfigurationLoadResult.cs index 6b08baa65..c587383a1 100644 --- a/Ryujinx.Ui.Common/Configuration/ConfigurationLoadResult.cs +++ b/Ryujinx.Ui.Common/Configuration/ConfigurationLoadResult.cs @@ -1,5 +1,8 @@ +using System; + namespace Ryujinx.Ui.Common.Configuration { + [Flags] public enum ConfigurationLoadResult { Success = 0, diff --git a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs index ae183fea7..60f57f356 100644 --- a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs @@ -750,7 +750,7 @@ namespace Ryujinx.Ui.Common.Configuration { bool configurationFileUpdated = false; - if (configurationFileFormat.Version < 0 || configurationFileFormat.Version > ConfigurationFileFormat.CurrentVersion) + if (configurationFileFormat.Version is < 0 or > ConfigurationFileFormat.CurrentVersion) { Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");