From fd855f851e5c40d87df6cff3fc4367323fd0754e Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 7 Jun 2019 19:52:56 +0100 Subject: [PATCH] Fixed a const access issue in OwnedArray --- modules/juce_core/containers/juce_OwnedArray.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/containers/juce_OwnedArray.h b/modules/juce_core/containers/juce_OwnedArray.h index 4f2cfa9f23..155f790337 100644 --- a/modules/juce_core/containers/juce_OwnedArray.h +++ b/modules/juce_core/containers/juce_OwnedArray.h @@ -230,7 +230,15 @@ public: /** Returns a pointer to the first element in the array. This method is provided for compatibility with the standard C++ containers. */ - inline ObjectClass** data() const noexcept + inline ObjectClass** data() noexcept + { + return begin(); + } + + /** Returns a pointer to the first element in the array. + This method is provided for compatibility with the standard C++ containers. + */ + inline ObjectClass* const* data() const noexcept { return begin(); }