mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Clarified comments around the JUCE_ALLOW_STATIC_NULL_VARIABLES items to make clear that they're deprecated
This commit is contained in:
parent
ef482e6c37
commit
85f74ca7d3
11 changed files with 59 additions and 77 deletions
|
|
@ -688,12 +688,8 @@ ValueTree ValueTree::getSibling (int delta) const noexcept
|
|||
|
||||
static const var& getNullVarRef() noexcept
|
||||
{
|
||||
#if JUCE_ALLOW_STATIC_NULL_VARIABLES
|
||||
return var::null;
|
||||
#else
|
||||
static var nullVar;
|
||||
return nullVar;
|
||||
#endif
|
||||
}
|
||||
|
||||
const var& ValueTree::operator[] (const Identifier& name) const noexcept
|
||||
|
|
|
|||
|
|
@ -532,19 +532,18 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
#if JUCE_ALLOW_STATIC_NULL_VARIABLES
|
||||
/** An invalid ValueTree that can be used if you need to return one as an error condition, etc.
|
||||
This invalid object is equivalent to ValueTree created with its default constructor, but
|
||||
you should always prefer to avoid it and use ValueTree() or {} instead.
|
||||
*/
|
||||
static const ValueTree invalid;
|
||||
#endif
|
||||
|
||||
/** Returns the total number of references to the shared underlying data structure that this
|
||||
ValueTree is using.
|
||||
*/
|
||||
int getReferenceCount() const noexcept;
|
||||
|
||||
#if JUCE_ALLOW_STATIC_NULL_VARIABLES
|
||||
/** An invalid ValueTree that can be used if you need to return one as an error condition, etc.
|
||||
@deprecated If you need an empty ValueTree object, just use ValueTree() or {}.
|
||||
*/
|
||||
static const ValueTree invalid;
|
||||
#endif
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
JUCE_PUBLIC_IN_DLL_BUILD (class SharedObject)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue