diff --git a/modules/juce_core/containers/juce_NamedValueSet.cpp b/modules/juce_core/containers/juce_NamedValueSet.cpp index 1c3efa4a2c..64b1778729 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.cpp +++ b/modules/juce_core/containers/juce_NamedValueSet.cpp @@ -26,40 +26,6 @@ ============================================================================== */ -struct NamedValueSet::NamedValue -{ - NamedValue() noexcept {} - NamedValue (const Identifier& n, const var& v) : name (n), value (v) {} - NamedValue (const NamedValue& other) : name (other.name), value (other.value) {} - - #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS - NamedValue (NamedValue&& other) noexcept - : name (static_cast (other.name)), - value (static_cast (other.value)) - { - } - - NamedValue (Identifier&& n, var&& v) noexcept - : name (static_cast (n)), - value (static_cast (v)) - { - } - - NamedValue& operator= (NamedValue&& other) noexcept - { - name = static_cast (other.name); - value = static_cast (other.value); - return *this; - } - #endif - - bool operator== (const NamedValue& other) const noexcept { return name == other.name && value == other.value; } - bool operator!= (const NamedValue& other) const noexcept { return ! operator== (other); } - - Identifier name; - var value; -}; - //============================================================================== NamedValueSet::NamedValueSet() noexcept { diff --git a/modules/juce_core/containers/juce_NamedValueSet.h b/modules/juce_core/containers/juce_NamedValueSet.h index 80f99ed12a..a62ffc23b2 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.h +++ b/modules/juce_core/containers/juce_NamedValueSet.h @@ -60,6 +60,45 @@ public: bool operator!= (const NamedValueSet&) const; //============================================================================== + struct NamedValue + { + NamedValue() noexcept {} + NamedValue (const Identifier& n, const var& v) : name (n), value (v) {} + NamedValue (const NamedValue& other) : name (other.name), value (other.value) {} + + #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS + NamedValue (NamedValue&& other) noexcept + : name (static_cast (other.name)), + value (static_cast (other.value)) + { + } + + NamedValue (Identifier&& n, var&& v) noexcept + : name (static_cast (n)), + value (static_cast (v)) + { + } + + NamedValue& operator= (NamedValue&& other) noexcept + { + name = static_cast (other.name); + value = static_cast (other.value); + return *this; + } + #endif + + bool operator== (const NamedValue& other) const noexcept { return name == other.name && value == other.value; } + bool operator!= (const NamedValue& other) const noexcept { return ! operator== (other); } + + Identifier name; + var value; + }; + + NamedValueSet::NamedValue* begin() { return values.begin(); } + NamedValueSet::NamedValue* end() { return values.end(); } + + //============================================================================== + /** Returns the total number of values that the set contains. */ int size() const noexcept; @@ -140,7 +179,6 @@ public: private: //============================================================================== - struct NamedValue; Array values; };