minor cleanups
This commit is contained in:
parent
582d9dfc24
commit
8d6b51d54c
|
@ -171,7 +171,9 @@ namespace detail {
|
|||
if (i != j) m_access_list.erase(std::next(i), j);
|
||||
if (i->start == first)
|
||||
{
|
||||
// we can do this const-cast because we know that the new
|
||||
// This is an optimization over erasing and inserting a new element
|
||||
// here.
|
||||
// this const-cast is OK because we know that the new
|
||||
// start address will keep the set correctly ordered
|
||||
const_cast<Addr&>(i->start) = first;
|
||||
const_cast<std::uint32_t&>(i->access) = flags;
|
||||
|
|
|
@ -171,8 +171,8 @@ namespace libtorrent { namespace dht {
|
|||
node* get_node(node_id const& id, std::string const& family_name);
|
||||
|
||||
// implements socket_manager
|
||||
virtual bool has_quota() override;
|
||||
virtual bool send_packet(aux::listen_socket_handle const& s, entry& e, udp::endpoint const& addr) override;
|
||||
bool has_quota() override;
|
||||
bool send_packet(aux::listen_socket_handle const& s, entry& e, udp::endpoint const& addr) override;
|
||||
|
||||
// this is the bdecode_node DHT messages are parsed into. It's a member
|
||||
// in order to avoid having to deallocate and re-allocate it for every
|
||||
|
|
|
@ -6710,7 +6710,7 @@ namespace libtorrent {
|
|||
{
|
||||
bool const lhs_connecting = lhs->is_connecting() && !lhs->is_disconnecting();
|
||||
bool const rhs_connecting = rhs->is_connecting() && !rhs->is_disconnecting();
|
||||
if (lhs_connecting != rhs_connecting) return (lhs_connecting < rhs_connecting);
|
||||
if (lhs_connecting != rhs_connecting) return (int(lhs_connecting) < int(rhs_connecting));
|
||||
|
||||
// a lower value of connected_time means it's been waiting
|
||||
// longer. This is a less-than comparison, so if lhs has
|
||||
|
|
Loading…
Reference in New Issue