0
0
Fork 0
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:
Jason Volk 2020-02-11 21:35:18 -08:00
parent e17318a334
commit 9dfcd63797

View file

@ -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);
}
}
}