mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd::json: Add expect; minor rename.
This commit is contained in:
parent
e17318a334
commit
9dfcd63797
1 changed files with 5 additions and 5 deletions
10
ircd/json.cc
10
ircd/json.cc
|
@ -452,19 +452,19 @@ template<class it_a,
|
|||
class closure>
|
||||
inline void
|
||||
__attribute__((always_inline))
|
||||
ircd::json::printer::list_protocol(mutable_buffer &buffer,
|
||||
ircd::json::printer::list_protocol(mutable_buffer &out,
|
||||
it_a it,
|
||||
const it_b &end,
|
||||
closure&& lambda)
|
||||
{
|
||||
if(it != end)
|
||||
if(likely(it != end))
|
||||
{
|
||||
lambda(buffer, *it);
|
||||
lambda(out, *it);
|
||||
for(++it; it != end; ++it)
|
||||
{
|
||||
static const auto &printer(json::printer);
|
||||
printer(buffer, printer.value_sep);
|
||||
lambda(buffer, *it);
|
||||
printer(out, printer.value_sep);
|
||||
lambda(out, *it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue