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(); }