mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-29 08:02:23 -05:00
misc: chore: Use collection expressions in HLE project
This commit is contained in:
@@ -39,10 +39,10 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
||||
|
||||
if ((_commonArguments.AppletVersion >= 0x80000 && _shimKind == ShimKind.Web) || (_commonArguments.AppletVersion >= 0x30000 && _shimKind == ShimKind.Share))
|
||||
{
|
||||
List<BrowserOutput> result = new()
|
||||
{
|
||||
new BrowserOutput(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton),
|
||||
};
|
||||
List<BrowserOutput> result =
|
||||
[
|
||||
new BrowserOutput(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton)
|
||||
];
|
||||
|
||||
_normalSession.Push(BuildResponseNew(result));
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
||||
|
||||
public static (ShimKind, List<BrowserArgument>) ParseArguments(ReadOnlySpan<byte> data)
|
||||
{
|
||||
List<BrowserArgument> browserArguments = new();
|
||||
List<BrowserArgument> browserArguments = [];
|
||||
|
||||
WebArgHeader header = IApplet.ReadStruct<WebArgHeader>(data[..8]);
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
||||
string messageText = Encoding.ASCII.GetString(messageTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
||||
string detailsText = Encoding.ASCII.GetString(detailsTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
||||
|
||||
List<string> buttons = new();
|
||||
List<string> buttons = [];
|
||||
|
||||
// TODO: Handle the LanguageCode to return the translated "OK" and "Details".
|
||||
|
||||
|
||||
@@ -122,13 +122,14 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
{
|
||||
// Try a list of fonts in case any of them is not available in the system.
|
||||
|
||||
string[] availableFonts = {
|
||||
string[] availableFonts =
|
||||
[
|
||||
uiThemeFontFamily,
|
||||
"Liberation Sans",
|
||||
"FreeSans",
|
||||
"DejaVu Sans",
|
||||
"Lucida Grande",
|
||||
};
|
||||
"Lucida Grande"
|
||||
];
|
||||
|
||||
foreach (string fontFamily in availableFonts)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user