0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::json: Remove empty initializer list members.

This commit is contained in:
Jason Volk 2017-04-02 20:58:30 -07:00
parent 217a0e9454
commit 6de469c8fb

View file

@ -724,6 +724,13 @@ ircd::json::obj::obj(std::initializer_list<member> builder)
{
return std::move(const_cast<member &>(m));
});
const auto empty([](const auto &member)
{
return member.first.empty();
});
idx.erase(std::remove_if(std::begin(idx), std::end(idx), empty), idx.end());
}
bool