1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

Win32 compatibility for get_peer_stats (#6743)

This commit is contained in:
Cœur 2024-03-28 17:40:08 +08:00 committed by GitHub
parent 2ff3ae07d1
commit 465b878e8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1828,8 +1828,6 @@ namespace peer_stat_helpers
tr_peer_stat* tr_peerMgrPeerStats(tr_torrent const* tor, size_t* setme_count) tr_peer_stat* tr_peerMgrPeerStats(tr_torrent const* tor, size_t* setme_count)
{ {
using namespace peer_stat_helpers;
TR_ASSERT(tr_isTorrent(tor)); TR_ASSERT(tr_isTorrent(tor));
TR_ASSERT(tor->swarm->manager != nullptr); TR_ASSERT(tor->swarm->manager != nullptr);
@ -1849,7 +1847,7 @@ tr_peer_stat* tr_peerMgrPeerStats(tr_torrent const* tor, size_t* setme_count)
std::begin(peers), std::begin(peers),
std::end(peers), std::end(peers),
ret, ret,
[&now, &now_msec](auto const* peer) { return get_peer_stats(peer, now, now_msec); }); [&now, &now_msec](auto const* peer) { return peer_stat_helpers::get_peer_stats(peer, now, now_msec); });
done_promise.set_value(); done_promise.set_value();
}); });
done_future.wait(); done_future.wait();