0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::json: Rearrange branch blocks.

This commit is contained in:
Jason Volk 2020-05-25 22:47:24 -07:00
parent f2f3e9a8a5
commit 188e9b1c81

View file

@ -3000,16 +3000,14 @@ ircd::string_view
ircd::json::stringify(mutable_buffer &buf,
const array &v)
{
if(string_view{v}.empty())
{
const char *const start{begin(buf)};
consume(buf, copy(buf, empty_array));
const string_view ret{start, begin(buf)};
assert(serialized(v) == size(ret));
return ret;
}
if(likely(!string_view{v}.empty()))
return array::stringify(buf, begin(v), end(v));
return array::stringify(buf, begin(v), end(v));
const char *const start{begin(buf)};
consume(buf, copy(buf, empty_array));
const string_view ret{start, begin(buf)};
assert(serialized(v) == size(ret));
return ret;
}
size_t