mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Avoid binding constant reference to returned object
In such cases, it makes no sense doing so.
This commit is contained in:
parent
5d4da09093
commit
56766dc08b
6 changed files with 13 additions and 13 deletions
|
@ -75,7 +75,7 @@ void ReverseResolution::resolve(const QString &ip)
|
|||
|
||||
void ReverseResolution::hostResolved(const QHostInfo &host)
|
||||
{
|
||||
const QString &ip = m_lookups.take(host.lookupId());
|
||||
const QString ip = m_lookups.take(host.lookupId());
|
||||
Q_ASSERT(!ip.isNull());
|
||||
|
||||
if (host.error() != QHostInfo::NoError) {
|
||||
|
@ -83,7 +83,7 @@ void ReverseResolution::hostResolved(const QHostInfo &host)
|
|||
return;
|
||||
}
|
||||
|
||||
const QString &hostname = host.hostName();
|
||||
const QString hostname = host.hostName();
|
||||
|
||||
qDebug() << Q_FUNC_INFO << ip << QString("->") << hostname;
|
||||
m_cache.insert(ip, new QString(hostname));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue