mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::json: Memoize query for type.
This commit is contained in:
parent
afcb22b726
commit
5ede78afe8
1 changed files with 6 additions and 6 deletions
12
ircd/json.cc
12
ircd/json.cc
|
@ -749,12 +749,12 @@ ircd::json::merge(stack::object &out,
|
|||
|
||||
void merge(const string_view &v)
|
||||
{
|
||||
if(type(v) == json::OBJECT)
|
||||
_merge_object(v);
|
||||
else if(type(v) == json::ARRAY)
|
||||
_merge_array(v);
|
||||
else
|
||||
this->v = v;
|
||||
switch(json::type(v))
|
||||
{
|
||||
case json::OBJECT: _merge_object(v); break;
|
||||
case json::ARRAY: _merge_array(v); break;
|
||||
default: this->v = v; break;
|
||||
}
|
||||
}
|
||||
|
||||
void _compose_object(json::stack &out, json::stack::object &object) const
|
||||
|
|
Loading…
Reference in a new issue