From 09be38bc466d575013c57d712c8ce90bab80de1d Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Sun, 20 Mar 2016 22:16:03 +0100 Subject: [PATCH] Added isEmpty() method to OwnedArray. --- modules/juce_core/containers/juce_OwnedArray.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/juce_core/containers/juce_OwnedArray.h b/modules/juce_core/containers/juce_OwnedArray.h index 31078f619c..9fdb61edd4 100644 --- a/modules/juce_core/containers/juce_OwnedArray.h +++ b/modules/juce_core/containers/juce_OwnedArray.h @@ -126,6 +126,12 @@ public: return numUsed; } + /** Returns true if the array is empty, false otherwise. */ + inline bool isEmpty() const noexcept + { + return size() == 0; + } + /** Returns a pointer to the object at this index in the array. If the index is out-of-range, this will return a null pointer, (and