Use Array instead of List
This commit is contained in:
parent
3f483d53d4
commit
f650855483
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Bcat
|
||||||
private const int DeliveryCacheDirectoriesLimit = 100;
|
private const int DeliveryCacheDirectoriesLimit = 100;
|
||||||
private const int DeliveryCacheDirectoryNameLength = 32;
|
private const int DeliveryCacheDirectoryNameLength = 32;
|
||||||
|
|
||||||
private List<string> _deliveryCacheDirectories = new List<string>();
|
private string[] _deliveryCacheDirectories = new string[0];
|
||||||
|
|
||||||
public IDeliveryCacheStorageService(ServiceCtx context, ApplicationLaunchProperty applicationLaunchProperty)
|
public IDeliveryCacheStorageService(ServiceCtx context, ApplicationLaunchProperty applicationLaunchProperty)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Services.Bcat
|
||||||
long outputPosition = context.Request.ReceiveBuff[0].Position;
|
long outputPosition = context.Request.ReceiveBuff[0].Position;
|
||||||
long outputSize = context.Request.ReceiveBuff[0].Size;
|
long outputSize = context.Request.ReceiveBuff[0].Size;
|
||||||
|
|
||||||
for (int index = 0; index < _deliveryCacheDirectories.Count; index++)
|
for (int index = 0; index < _deliveryCacheDirectories.Length; index++)
|
||||||
{
|
{
|
||||||
if (index == DeliveryCacheDirectoriesLimit - 1)
|
if (index == DeliveryCacheDirectoriesLimit - 1)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ namespace Ryujinx.HLE.HOS.Services.Bcat
|
||||||
context.Memory.WriteBytes(outputPosition + index * DeliveryCacheDirectoryNameLength, directoryNameBuffer);
|
context.Memory.WriteBytes(outputPosition + index * DeliveryCacheDirectoryNameLength, directoryNameBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
context.ResponseData.Write(_deliveryCacheDirectories.Count);
|
context.ResponseData.Write(_deliveryCacheDirectories.Length);
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue