mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a handy initialiser-list based constructor for NamedValueSet
This commit is contained in:
parent
c3c43bc738
commit
e2427065e0
4 changed files with 36 additions and 22 deletions
|
|
@ -587,12 +587,11 @@ ValueTree::ValueTree (const Identifier& type) : object (new ValueTree::SharedOb
|
|||
}
|
||||
|
||||
ValueTree::ValueTree (const Identifier& type,
|
||||
std::initializer_list<std::pair<Identifier, var>> properties,
|
||||
std::initializer_list<NamedValueSet::NamedValue> properties,
|
||||
std::initializer_list<ValueTree> subTrees)
|
||||
: ValueTree (type)
|
||||
{
|
||||
for (auto& prop : properties)
|
||||
setProperty (prop.first, prop.second, nullptr);
|
||||
object->properties = NamedValueSet (std::move (properties));
|
||||
|
||||
for (auto& tree : subTrees)
|
||||
addChild (tree, -1, nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue