1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-15 00:24:19 +00:00

Added begin/end iterators to MemoryBlock

This commit is contained in:
jules 2017-02-08 15:28:07 +00:00
parent 57ecf44d13
commit d094fc2f52

View file

@ -103,6 +103,11 @@ public:
template <typename Type>
char& operator[] (const Type offset) const noexcept { return data [offset]; }
/** Returns an iterator for the data. */
char* begin() const noexcept { return data; }
/** Returns an end-iterator for the data. */
char* end() const noexcept { return begin() + getSize(); }
//==============================================================================
/** Returns the block's current allocated size, in bytes. */