Network chat: simplify lookup function
Task-number: QTBUG-108873 Change-Id: I3ca0c976236003c708130ed120dba14cfbbf8185 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
804b26b77d
commit
e33bbdb0ea
@ -56,11 +56,7 @@ void PeerManager::startBroadcasting()
|
||||
|
||||
bool PeerManager::isLocalHostAddress(const QHostAddress &address) const
|
||||
{
|
||||
for (const QHostAddress &localAddress : ipAddresses) {
|
||||
if (address.isEqual(localAddress))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return ipAddresses.contains(address);
|
||||
}
|
||||
|
||||
void PeerManager::sendBroadcastDatagram()
|
||||
|
Loading…
Reference in New Issue
Block a user