mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-03 04:47:11 +02:00
misc: chore: Use collection expressions in HLE project
This commit is contained in:
parent
3c2f283ec7
commit
70b767ef60
72 changed files with 312 additions and 299 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue