0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-23 21:33:44 +02:00

ircd:Ⓜ️:room::power: Cleanup with decompositions.

This commit is contained in:
Jason Volk 2020-04-18 22:41:47 -07:00
parent 2c7af26bdc
commit 90fd775482

View file

@ -407,8 +407,8 @@ const
view([&ret]
(const json::object &content)
{
for(const auto &member : content)
ret += json::type(member.second) == json::OBJECT;
for(const auto &[key, val] : content)
ret += json::type(val) == json::OBJECT;
});
return ret;
@ -572,18 +572,18 @@ const
for(auto it(begin(collection)); it != end(collection) && ret; ++it)
{
const auto &member(*it);
if(json::type(unquote(member.second)) != json::NUMBER)
const auto &[key_, val_] {*it};
if(json::type(unquote(val_)) != json::NUMBER)
continue;
const json::string &key
{
member.first
key_
};
const auto &val
{
lex_cast<int64_t>(member.second)
lex_cast<int64_t>(val_)
};
ret = closure(key, val);