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

@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
if (userId.IsNull)
{
userId = new UserId(Guid.NewGuid().ToString().Replace("-", ""));
userId = new UserId(Guid.NewGuid().ToString().Replace("-", string.Empty));
}
UserProfile profile = new(userId, name, image);

View file

@ -1,3 +1,4 @@
using Gommon;
using Ryujinx.Common.Logging;
using Ryujinx.Common.Memory;
using Ryujinx.Common.Utilities;
@ -143,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
if (decompressedLdnData.Length != header.DecompressLength)
{
Logger.Error?.PrintMsg(LogClass.ServiceLdn, $"Decompress error: length does not match. ({decompressedLdnData.Length} != {header.DecompressLength})");
Logger.Error?.PrintMsg(LogClass.ServiceLdn, $"Decompress error data: '{string.Join("", decompressedLdnData.Select(x => (int)x).ToArray())}'");
Logger.Error?.PrintMsg(LogClass.ServiceLdn, $"Decompress error data: '{decompressedLdnData.Select(x => (int)x).JoinToString(string.Empty)}'");
return;
}

View file

@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Ngct
ulong bufferSize = context.Request.PtrBuff[0].Size;
bool isMatch = false;
string text = "";
string text = string.Empty;
if (bufferSize != 0)
{
@ -57,8 +57,8 @@ namespace Ryujinx.HLE.HOS.Services.Ngct
ulong bufferFilteredPosition = context.Request.RecvListBuff[0].Position;
string text = "";
string textFiltered = "";
string text = string.Empty;
string textFiltered = string.Empty;
if (bufferSize != 0)
{

File diff suppressed because it is too large Load diff

View file

@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd.Manager
// TODO: Load Environment from the savedata.
address = address.Replace("%", IManager.NsdSettings.Environment);
resolvedAddress = "";
resolvedAddress = string.Empty;
if (IManager.NsdSettings == null)
{

View file

@ -63,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
if (size < 0)
{
return "";
return string.Empty;
}
ReadOnlySpan<byte> data = ReadInPlace((size + 1) * 2);

View file

@ -166,7 +166,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
private ResultCode OpenDisplayImpl(ServiceCtx context, string name)
{
if (name == "")
if (name == string.Empty)
{
return ResultCode.InvalidValue;
}