diff options
Diffstat (limited to 'src/alloc')
-rw-r--r-- | src/alloc/secmem.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h index dc5e90b79..c87035a1e 100644 --- a/src/alloc/secmem.h +++ b/src/alloc/secmem.h @@ -34,6 +34,7 @@ class MemoryRegion */ bool empty() const { return (used == 0); } +#if 1 /** * Get a pointer to the first element in the buffer. * @return pointer to the first element in the buffer @@ -45,6 +46,12 @@ class MemoryRegion * @return constant pointer to the first element in the buffer */ operator const T* () const { return buf; } +#else + + T& operator[](u32bit n) { return buf[n]; } + const T& operator[](u32bit n) const { return buf[n]; } + +#endif /** * Get a pointer to the first element in the buffer. |