mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:57:45 +00:00
JsonArray: Add for_each() helper.
This commit is contained in:
parent
2c1c4ab116
commit
15003245cd
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,13 @@ public:
|
|||
String serialized() const;
|
||||
void serialize(StringBuilder&) const;
|
||||
|
||||
template<typename Callback>
|
||||
void for_each(Callback callback) const
|
||||
{
|
||||
for (auto& value : m_values)
|
||||
callback(value);
|
||||
}
|
||||
|
||||
private:
|
||||
Vector<JsonValue> m_values;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue