mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Improve coding style
This commit is contained in:
@@ -70,12 +70,14 @@ namespace Utils
|
||||
QHostAddress protocolEquivalentAddress;
|
||||
bool addrConversionOk = false;
|
||||
|
||||
if (addr.protocol() == QAbstractSocket::IPv4Protocol) {
|
||||
if (addr.protocol() == QAbstractSocket::IPv4Protocol)
|
||||
{
|
||||
// always succeeds
|
||||
protocolEquivalentAddress = QHostAddress(addr.toIPv6Address());
|
||||
addrConversionOk = true;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
// only succeeds when addr is an ipv4-mapped ipv6 address
|
||||
protocolEquivalentAddress = QHostAddress(addr.toIPv4Address(&addrConversionOk));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user