misc: Replace "" with string.Empty.

This commit is contained in:
Evan Husted 2024-11-01 11:57:23 -05:00
parent 9305d171e7
commit 139c195eb7
52 changed files with 1649 additions and 1636 deletions

View file

@ -107,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
private static string CleanText(string value)
{
return CleanTextRegex().Replace(value, "").Replace("\0", "");
return CleanTextRegex().Replace(value, string.Empty).Replace("\0", string.Empty);
}
private string GetMessageText(uint module, uint description, string key)
@ -129,17 +129,15 @@ namespace Ryujinx.HLE.HOS.Applets.Error
return CleanText(reader.ReadToEnd());
}
else
{
return "";
}
return string.Empty;
}
private string[] GetButtonsText(uint module, uint description, string key)
{
string buttonsText = GetMessageText(module, description, key);
return (buttonsText == "") ? null : buttonsText.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
return (buttonsText == string.Empty) ? null : buttonsText.Split(["\r\n", "\r", "\n"], StringSplitOptions.None);
}
private void ParseErrorCommonArg()
@ -156,7 +154,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
string message = GetMessageText(module, description, "DlgMsg");
if (message == "")
if (message == string.Empty)
{
message = "An error has occured.\n\nPlease try again later.";
}
@ -190,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
// TODO: Handle the LanguageCode to return the translated "OK" and "Details".
if (detailsText.Trim() != "")
if (detailsText.Trim() != string.Empty)
{
buttons.Add("Details");
}