forked from premiere/premiere-libtorrent
move vectors into alerts (#699)
This commit is contained in:
parent
3d42c70cae
commit
fa693174e7
|
@ -2215,8 +2215,8 @@ namespace libtorrent
|
|||
{
|
||||
// internal
|
||||
dht_stats_alert(aux::stack_allocator& alloc
|
||||
, std::vector<dht_routing_bucket> const& table
|
||||
, std::vector<dht_lookup> const& requests);
|
||||
, std::vector<dht_routing_bucket> table
|
||||
, std::vector<dht_lookup> requests);
|
||||
|
||||
TORRENT_DEFINE_ALERT(dht_stats_alert, 83)
|
||||
|
||||
|
|
|
@ -1318,7 +1318,7 @@ namespace libtorrent {
|
|||
|
||||
state_update_alert::state_update_alert(aux::stack_allocator&
|
||||
, std::vector<torrent_status> st)
|
||||
: status(st)
|
||||
: status(std::move(st))
|
||||
{}
|
||||
|
||||
std::string state_update_alert::message() const
|
||||
|
@ -1672,11 +1672,11 @@ namespace libtorrent {
|
|||
}
|
||||
|
||||
dht_stats_alert::dht_stats_alert(aux::stack_allocator&
|
||||
, std::vector<dht_routing_bucket> const& table
|
||||
, std::vector<dht_lookup> const& requests)
|
||||
, std::vector<dht_routing_bucket> table
|
||||
, std::vector<dht_lookup> requests)
|
||||
: alert()
|
||||
, active_requests(requests)
|
||||
, routing_table(table)
|
||||
, active_requests(std::move(requests))
|
||||
, routing_table(std::move(table))
|
||||
{}
|
||||
|
||||
std::string dht_stats_alert::message() const
|
||||
|
@ -1888,7 +1888,7 @@ namespace libtorrent {
|
|||
std::vector<tcp::endpoint> p(peers());
|
||||
v.reserve(p.size());
|
||||
std::copy(p.begin(), p.end(), std::back_inserter(v));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
std::vector<tcp::endpoint> dht_get_peers_reply_alert::peers() const {
|
||||
std::vector<tcp::endpoint> peers(m_num_peers);
|
||||
|
|
|
@ -4523,7 +4523,7 @@ namespace aux {
|
|||
m_posting_torrent_updates = false;
|
||||
#endif
|
||||
|
||||
m_alerts.emplace_alert<state_update_alert>(status);
|
||||
m_alerts.emplace_alert<state_update_alert>(std::move(status));
|
||||
}
|
||||
|
||||
void session_impl::post_session_stats()
|
||||
|
@ -4564,7 +4564,7 @@ namespace aux {
|
|||
m_dht->dht_status(table, requests);
|
||||
#endif
|
||||
|
||||
m_alerts.emplace_alert<dht_stats_alert>(table, requests);
|
||||
m_alerts.emplace_alert<dht_stats_alert>(std::move(table), std::move(requests));
|
||||
}
|
||||
|
||||
std::vector<torrent_handle> session_impl::get_torrents() const
|
||||
|
|
Loading…
Reference in New Issue