forked from premiere/premiere-libtorrent
return a bdecode_node rather than taking one by reference
This commit is contained in:
parent
1ff48aef60
commit
8e00172af7
|
@ -2395,7 +2395,7 @@ namespace libtorrent
|
|||
void* userdata;
|
||||
udp::endpoint addr;
|
||||
|
||||
void response(bdecode_node& ret) const;
|
||||
bdecode_node response() const;
|
||||
|
||||
private:
|
||||
aux::stack_allocator& m_alloc;
|
||||
|
|
|
@ -1848,13 +1848,15 @@ namespace libtorrent {
|
|||
return msg;
|
||||
}
|
||||
|
||||
void dht_direct_response_alert::response(bdecode_node& ret) const
|
||||
bdecode_node dht_direct_response_alert::response() const
|
||||
{
|
||||
char const* start = m_alloc.ptr(m_response_idx);
|
||||
char const* end = start + m_response_size;
|
||||
error_code ec;
|
||||
bdecode_node ret;
|
||||
bdecode(start, end, ret, ec);
|
||||
TORRENT_ASSERT(!ec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace libtorrent
|
||||
|
|
Loading…
Reference in New Issue