forked from premiere/premiere-libtorrent
fix const correctness in get_peer_class
This commit is contained in:
parent
4c4c630fae
commit
edad33d270
|
@ -468,7 +468,7 @@ namespace aux {
|
|||
void set_peer_class_type_filter(peer_class_type_filter f);
|
||||
peer_class_type_filter get_peer_class_type_filter();
|
||||
|
||||
peer_class_info get_peer_class(peer_class_t cid);
|
||||
peer_class_info get_peer_class(peer_class_t cid) const;
|
||||
void set_peer_class(peer_class_t cid, peer_class_info const& pci);
|
||||
|
||||
bool is_listening() const;
|
||||
|
|
|
@ -698,7 +698,7 @@ namespace libtorrent {
|
|||
// account.
|
||||
//
|
||||
// For more information, see peer-classes_.
|
||||
peer_class_info get_peer_class(peer_class_t cid);
|
||||
peer_class_info get_peer_class(peer_class_t cid) const;
|
||||
void set_peer_class(peer_class_t cid, peer_class_info const& pci);
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
|
|
|
@ -840,7 +840,7 @@ namespace {
|
|||
async_call(&session_impl::delete_peer_class, cid);
|
||||
}
|
||||
|
||||
peer_class_info session_handle::get_peer_class(peer_class_t cid)
|
||||
peer_class_info session_handle::get_peer_class(peer_class_t cid) const
|
||||
{
|
||||
return sync_call_ret<peer_class_info>(&session_impl::get_peer_class, cid);
|
||||
}
|
||||
|
|
|
@ -1091,12 +1091,12 @@ namespace {
|
|||
m_classes.decref(cid);
|
||||
}
|
||||
|
||||
peer_class_info session_impl::get_peer_class(peer_class_t cid)
|
||||
peer_class_info session_impl::get_peer_class(peer_class_t const cid) const
|
||||
{
|
||||
peer_class_info ret;
|
||||
peer_class* pc = m_classes.at(cid);
|
||||
peer_class const* pc = m_classes.at(cid);
|
||||
// if you hit this assert, you're passing in an invalid cid
|
||||
TORRENT_ASSERT(pc);
|
||||
TORRENT_ASSERT_PRECOND(pc);
|
||||
if (pc == nullptr)
|
||||
{
|
||||
#if TORRENT_USE_INVARIANT_CHECKS
|
||||
|
|
|
@ -445,7 +445,7 @@ TORRENT_TEST(init_dht)
|
|||
auto count_dht_inits = [](session& ses)
|
||||
{
|
||||
int count = 0;
|
||||
int num = 70; // this number is adjusted per version, an estimate
|
||||
int num = 120; // this number is adjusted per version, an estimate
|
||||
time_point const end_time = clock_type::now() + seconds(15);
|
||||
while (true)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue