avoid copy of arrays in dht alerts constructors
This commit is contained in:
parent
e317c72db3
commit
965ca9a565
|
@ -2214,7 +2214,7 @@ TORRENT_VERSION_NAMESPACE_2
|
||||||
struct TORRENT_EXPORT dht_mutable_item_alert final : alert
|
struct TORRENT_EXPORT dht_mutable_item_alert final : alert
|
||||||
{
|
{
|
||||||
dht_mutable_item_alert(aux::stack_allocator& alloc
|
dht_mutable_item_alert(aux::stack_allocator& alloc
|
||||||
, std::array<char, 32> k, std::array<char, 64> sig
|
, std::array<char, 32> const& k, std::array<char, 64> const& sig
|
||||||
, std::int64_t sequence, string_view s, entry const& i, bool a);
|
, std::int64_t sequence, string_view s, entry const& i, bool a);
|
||||||
|
|
||||||
TORRENT_DEFINE_ALERT_PRIO(dht_mutable_item_alert, 75, alert_priority_critical)
|
TORRENT_DEFINE_ALERT_PRIO(dht_mutable_item_alert, 75, alert_priority_critical)
|
||||||
|
@ -2252,8 +2252,8 @@ TORRENT_VERSION_NAMESPACE_2
|
||||||
{
|
{
|
||||||
// internal
|
// internal
|
||||||
dht_put_alert(aux::stack_allocator& alloc, sha1_hash const& t, int n);
|
dht_put_alert(aux::stack_allocator& alloc, sha1_hash const& t, int n);
|
||||||
dht_put_alert(aux::stack_allocator& alloc, std::array<char, 32> key
|
dht_put_alert(aux::stack_allocator& alloc, std::array<char, 32> const& key
|
||||||
, std::array<char, 64> sig
|
, std::array<char, 64> const& sig
|
||||||
, std::string s
|
, std::string s
|
||||||
, std::int64_t sequence_number
|
, std::int64_t sequence_number
|
||||||
, int n);
|
, int n);
|
||||||
|
|
|
@ -1680,8 +1680,8 @@ namespace {
|
||||||
// TODO: 2 the salt here is allocated on the heap. It would be nice to
|
// TODO: 2 the salt here is allocated on the heap. It would be nice to
|
||||||
// allocate in in the stack_allocator
|
// allocate in in the stack_allocator
|
||||||
dht_mutable_item_alert::dht_mutable_item_alert(aux::stack_allocator&
|
dht_mutable_item_alert::dht_mutable_item_alert(aux::stack_allocator&
|
||||||
, std::array<char, 32> k
|
, std::array<char, 32> const& k
|
||||||
, std::array<char, 64> sig
|
, std::array<char, 64> const& sig
|
||||||
, std::int64_t sequence
|
, std::int64_t sequence
|
||||||
, string_view s
|
, string_view s
|
||||||
, entry const& i
|
, entry const& i
|
||||||
|
@ -1711,8 +1711,8 @@ namespace {
|
||||||
{}
|
{}
|
||||||
|
|
||||||
dht_put_alert::dht_put_alert(aux::stack_allocator&
|
dht_put_alert::dht_put_alert(aux::stack_allocator&
|
||||||
, std::array<char, 32> key
|
, std::array<char, 32> const& key
|
||||||
, std::array<char, 64> sig
|
, std::array<char, 64> const& sig
|
||||||
, std::string s
|
, std::string s
|
||||||
, std::int64_t sequence_number
|
, std::int64_t sequence_number
|
||||||
, int n)
|
, int n)
|
||||||
|
|
Loading…
Reference in New Issue