mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 02:18:53 +02:00
ircd:Ⓜ️:room::power: Cleanup with decompositions.
This commit is contained in:
parent
2c7af26bdc
commit
90fd775482
1 changed files with 6 additions and 6 deletions
|
@ -407,8 +407,8 @@ const
|
||||||
view([&ret]
|
view([&ret]
|
||||||
(const json::object &content)
|
(const json::object &content)
|
||||||
{
|
{
|
||||||
for(const auto &member : content)
|
for(const auto &[key, val] : content)
|
||||||
ret += json::type(member.second) == json::OBJECT;
|
ret += json::type(val) == json::OBJECT;
|
||||||
});
|
});
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -572,18 +572,18 @@ const
|
||||||
|
|
||||||
for(auto it(begin(collection)); it != end(collection) && ret; ++it)
|
for(auto it(begin(collection)); it != end(collection) && ret; ++it)
|
||||||
{
|
{
|
||||||
const auto &member(*it);
|
const auto &[key_, val_] {*it};
|
||||||
if(json::type(unquote(member.second)) != json::NUMBER)
|
if(json::type(unquote(val_)) != json::NUMBER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const json::string &key
|
const json::string &key
|
||||||
{
|
{
|
||||||
member.first
|
key_
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto &val
|
const auto &val
|
||||||
{
|
{
|
||||||
lex_cast<int64_t>(member.second)
|
lex_cast<int64_t>(val_)
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = closure(key, val);
|
ret = closure(key, val);
|
||||||
|
|
Loading…
Reference in a new issue