aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/secmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc/secmem.h')
-rw-r--r--src/alloc/secmem.h7
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.