mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-15 04:07:36 +00:00
JsonArray: Add for_each() helper.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user