1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

Handy new functions: createCopyIfNotNull(), and ScopedPointer::createCopy()

This commit is contained in:
jules 2011-11-20 21:55:35 +00:00
parent 2ae2f8da30
commit 6b7496c893
6 changed files with 15 additions and 6 deletions

View file

@ -708,7 +708,7 @@ bool ValueTree::isEquivalentTo (const ValueTree& other) const
ValueTree ValueTree::createCopy() const
{
return ValueTree (object != nullptr ? new SharedObject (*object) : nullptr);
return ValueTree (createCopyIfNotNull (object.getObject()));
}
bool ValueTree::hasType (const Identifier& typeName) const