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:
parent
f2f3e9a8a5
commit
188e9b1c81
1 changed files with 7 additions and 9 deletions
16
ircd/json.cc
16
ircd/json.cc
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue