misc: chore: Use explicit types in HLE project

This commit is contained in:
Evan Husted
2025-01-25 14:13:18 -06:00
parent 58c1ab7989
commit 5eba42fa06
80 changed files with 410 additions and 397 deletions

View File

@@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
// TODO: Call nn::arp::GetApplicationControlProperty here when implemented.
ApplicationControlProperty controlProperty = context.Device.Processes.ActiveApplication.ApplicationControlProperties;
foreach (var localCommunicationId in controlProperty.LocalCommunicationId.ItemsRo)
foreach (ulong localCommunicationId in controlProperty.LocalCommunicationId.ItemsRo)
{
if (localCommunicationId == localCommunicationIdChecked)
{

View File

@@ -244,7 +244,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
byte[] ip = address.GetAddressBytes();
var macAddress = new Array6<byte>();
Array6<byte> macAddress = new Array6<byte>();
new byte[] { 0x02, 0x00, ip[0], ip[1], ip[2], ip[3] }.CopyTo(macAddress.AsSpan());
return macAddress;

View File

@@ -112,7 +112,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm.Proxy
lock (_scanLock)
{
var newResults = _scanResultsLast;
Dictionary<ulong, NetworkInfo> newResults = _scanResultsLast;
newResults.Clear();
_scanResultsLast = _scanResults;
@@ -138,7 +138,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm.Proxy
lock (_scanLock)
{
var results = new Dictionary<ulong, NetworkInfo>();
Dictionary<ulong, NetworkInfo> results = new Dictionary<ulong, NetworkInfo>();
foreach (KeyValuePair<ulong, NetworkInfo> last in _scanResultsLast)
{

View File

@@ -490,7 +490,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
SendAsync(_protocol.Encode(PacketId.CreateAccessPoint, request, advertiseData));
// Send a network change event with dummy data immediately. Necessary to avoid crashes in some games
var networkChangeEvent = new NetworkChangeEventArgs(new NetworkInfo()
NetworkChangeEventArgs networkChangeEvent = new NetworkChangeEventArgs(new NetworkInfo()
{
Common = new CommonNetworkInfo()
{
@@ -610,7 +610,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
SendAsync(_protocol.Encode(PacketId.Connect, request));
var networkChangeEvent = new NetworkChangeEventArgs(new NetworkInfo()
NetworkChangeEventArgs networkChangeEvent = new NetworkChangeEventArgs(new NetworkInfo()
{
Common = request.NetworkInfo.Common,
Ldn = request.NetworkInfo.Ldn

View File

@@ -256,7 +256,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
{
_proxy.ReturnEphemeralPort(ProtocolType, (ushort)((IPEndPoint)LocalEndPoint).Port);
}
var asIPEndpoint = (IPEndPoint)localEP;
IPEndPoint asIPEndpoint = (IPEndPoint)localEP;
if (asIPEndpoint.Port == 0)
{
asIPEndpoint.Port = (ushort)_proxy.GetEphemeralPort(ProtocolType);