mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added NamedValueSet::isEmpty()
This commit is contained in:
parent
ed067801eb
commit
6a66ff75bb
2 changed files with 9 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ struct NamedValueSet::NamedValue
|
|||
{
|
||||
}
|
||||
|
||||
NamedValue (Identifier&& n, var&& v)
|
||||
NamedValue (Identifier&& n, var&& v) noexcept
|
||||
: name (static_cast<Identifier&&> (n)),
|
||||
value (static_cast<var&&> (v))
|
||||
{
|
||||
|
|
@ -114,6 +114,11 @@ int NamedValueSet::size() const noexcept
|
|||
return values.size();
|
||||
}
|
||||
|
||||
bool NamedValueSet::isEmpty() const noexcept
|
||||
{
|
||||
return values.isEmpty();
|
||||
}
|
||||
|
||||
const var& NamedValueSet::operator[] (const Identifier& name) const noexcept
|
||||
{
|
||||
if (const var* v = getVarPointer (name))
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ public:
|
|||
/** Returns the total number of values that the set contains. */
|
||||
int size() const noexcept;
|
||||
|
||||
/** Returns true if the set is empty. */
|
||||
bool isEmpty() const noexcept;
|
||||
|
||||
/** Returns the value of a named item.
|
||||
If the name isn't found, this will return a void variant.
|
||||
@see getProperty
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue