Browse Source

Added begin/end iterators to MemoryBlock

tags/2021-05-28
jules 9 years ago
parent
commit
d094fc2f52
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_core/memory/juce_MemoryBlock.h

+ 5
- 0
modules/juce_core/memory/juce_MemoryBlock.h 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. */


Loading…
Cancel
Save