refactor: 修改变量名使其更直观

This commit is contained in:
SherkeyXD
2023-10-03 01:53:02 +08:00
parent df4219da8f
commit 44f5ae0f4b

View File

@@ -1273,14 +1273,14 @@ namespace MaaWpfGui.Main
}
// normal -> [host]:[port]
string[] addresses = address.Split(':');
if (addresses.Length != 2)
string[] host_and_port = address.Split(':');
if (host_and_port.Length != 2)
{
return false;
}
string host = addresses[0].Equals("emulator") ? "127.0.0.1" : addresses[0];
if (!int.TryParse(addresses[1], out int port))
string host = host_and_port[0].Equals("emulator") ? "127.0.0.1" : host_and_port[0];
if (!int.TryParse(host_and_port[1], out int port))
{
return false;
}