mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::json: Remove empty initializer list members.
This commit is contained in:
parent
217a0e9454
commit
6de469c8fb
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue