mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️ Use vector_view here.
This commit is contained in:
parent
68b5d53ae8
commit
2e9ef15cf5
2 changed files with 7 additions and 8 deletions
|
@ -28,7 +28,7 @@ struct ircd::m::txn
|
|||
json::property<name::pdus, json::array>
|
||||
>
|
||||
{
|
||||
using array = std::pair<const json::value *, size_t>;
|
||||
using array = vector_view<const json::value>;
|
||||
static string_view create_id(const mutable_buffer &out, const string_view &txn);
|
||||
static std::string create(const array &pdu, const array &edu, const array &pdu_failure = {});
|
||||
|
||||
|
|
13
ircd/m/m.cc
13
ircd/m/m.cc
|
@ -1193,25 +1193,25 @@ ircd::m::txn::create(const array &pdu,
|
|||
|
||||
const json::iov::add_if _pdus
|
||||
{
|
||||
iov, pdu.second,
|
||||
iov, !empty(pdu),
|
||||
{
|
||||
"pdus", { pdu.first, pdu.second }
|
||||
"pdus", { data(pdu), size(pdu) }
|
||||
}
|
||||
};
|
||||
|
||||
const json::iov::add_if _edus
|
||||
{
|
||||
iov, edu.second,
|
||||
iov, !empty(edu),
|
||||
{
|
||||
"edus", { edu.first, edu.second }
|
||||
"edus", { data(edu), size(edu) }
|
||||
}
|
||||
};
|
||||
|
||||
const json::iov::add_if _pdu_failures
|
||||
{
|
||||
iov, pdu_failure.second,
|
||||
iov, !empty(pdu_failure),
|
||||
{
|
||||
"pdu_failures", { pdu_failure.first, pdu_failure.second }
|
||||
"pdu_failures", { data(pdu_failure), size(pdu_failure) }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1403,7 +1403,6 @@ const
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hook::site
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue