mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Avoid heavy weight function object
Also, by switching to template we can avoid the cost of converting to some specific type and perfectly forward the parameter to the final function. PR #21572.
This commit is contained in:
@@ -71,7 +71,6 @@
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <QThreadPool>
|
||||
#include <QTimer>
|
||||
#include <QUuid>
|
||||
|
||||
@@ -3013,11 +3012,6 @@ void SessionImpl::removeMappedPorts(const QSet<quint16> &ports)
|
||||
});
|
||||
}
|
||||
|
||||
void SessionImpl::invokeAsync(std::function<void ()> func)
|
||||
{
|
||||
m_asyncWorker->start(std::move(func));
|
||||
}
|
||||
|
||||
// Add a torrent to libtorrent session in hidden mode
|
||||
// and force it to download its metadata
|
||||
bool SessionImpl::downloadMetadata(const TorrentDescriptor &torrentDescr)
|
||||
|
||||
Reference in New Issue
Block a user